Skip to content

Commit d81374e

Browse files
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
1 parent 8c1da76 commit d81374e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/opensnitch/dialogs/prompt/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def get_combo_operator(data, comboText, con):
193193
text = parts[len(parts)-1]
194194
# ^(|.*\.)yahoo\.com
195195
dsthost = r'\.'.join(text.split('.')).replace("*", "")
196-
dsthost = r'^(|.*\.)%s' % dsthost[2:]
196+
dsthost = r'^(|.*\.)%s$' % dsthost[2:]
197197
return Config.RULE_TYPE_REGEXP, Config.OPERAND_DEST_HOST, dsthost
198198

199199
elif data == _constants.FIELD_REGEX_IP:

0 commit comments

Comments
 (0)