ui,popups: fixed dest host regexp

We were not matching the end of the domain, which could lead to allow
more domains than expected.

kudos to @FWDekker for reporting this issue.

Closes: #1264
This commit is contained in:
Gustavo Iñiguez Goia 2025-02-21 00:28:22 +01:00
parent 8c1da76dff
commit d81374ebc7
Failed to generate hash of commit

View file

@ -193,7 +193,7 @@ def get_combo_operator(data, comboText, con):
text = parts[len(parts)-1]
# ^(|.*\.)yahoo\.com
dsthost = r'\.'.join(text.split('.')).replace("*", "")
dsthost = r'^(|.*\.)%s' % dsthost[2:]
dsthost = r'^(|.*\.)%s$' % dsthost[2:]
return Config.RULE_TYPE_REGEXP, Config.OPERAND_DEST_HOST, dsthost
elif data == _constants.FIELD_REGEX_IP: