mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
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:
parent
8c1da76dff
commit
d81374ebc7
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ def get_combo_operator(data, comboText, con):
|
||||||
text = parts[len(parts)-1]
|
text = parts[len(parts)-1]
|
||||||
# ^(|.*\.)yahoo\.com
|
# ^(|.*\.)yahoo\.com
|
||||||
dsthost = r'\.'.join(text.split('.')).replace("*", "")
|
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
|
return Config.RULE_TYPE_REGEXP, Config.OPERAND_DEST_HOST, dsthost
|
||||||
|
|
||||||
elif data == _constants.FIELD_REGEX_IP:
|
elif data == _constants.FIELD_REGEX_IP:
|
||||||
|
|
Loading…
Add table
Reference in a new issue