mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
unbound / blacklists: cleanse domain input. change regex in https://github.com/opnsense/core/issues/4898 per suggestion @kulikov-a
This commit is contained in:
parent
d3063a2017
commit
f538c08065
@ -82,7 +82,7 @@ if __name__ == '__main__':
|
||||
sys.exit(99)
|
||||
|
||||
domain_pattern = re.compile(
|
||||
r'(([\da-zA-Z])([_\w-]{,62})\.){,127}(([\da-zA-Z])[_\w-]{,61})'
|
||||
r'(([\da-zA-Z_])([_\w-]{,62})\.){,127}(([\da-zA-Z])[_\w-]{,61})'
|
||||
r'?([\da-zA-Z]\.((xn\-\-[a-zA-Z\d]+)|([a-zA-Z\d]{2,})))'
|
||||
)
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ custom_{{loop.index}}={{uri}}
|
||||
# exclude localhost entries
|
||||
default_pattern_1=.*localhost$
|
||||
# exclude non domain entries
|
||||
default_pattern_2=^(?![a-zA-Z\d]).*
|
||||
default_pattern_2=^(?![a-zA-Z_\d]).*
|
||||
{% if not helpers.empty('OPNsense.unboundplus.dnsbl.whitelists')%}
|
||||
# user defined
|
||||
{% for pattern in OPNsense.unboundplus.dnsbl.whitelists.split(',') %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user