Commit 731ae4cb authored by Jos Schellevis's avatar Jos Schellevis

(proxy) small changes to regex handling for black and whitelists

parent bdef8691
......@@ -96,10 +96,10 @@ acl bannedHosts src {{ip}}
{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
# ALC - Whitelist - User defined (whiteList)
{% for element in OPNsense.proxy.forward.acl.whiteList.split(",") %}
{% if ('^' or '\\' or '$' or '[') in element %}
{% if ('^' or '\' or '$' or '[') in element %}
acl whiteList url_regex {{element}}
{% else %}
acl whiteList url_regex .+{{element|replace(".","\.")}}
acl whiteList url_regex {{element|replace(".","\.")}}
{% endif %}
{% endfor %}
{% endif %}
......@@ -107,10 +107,10 @@ acl whiteList url_regex .+{{element|replace(".","\.")}}
# ALC - Blacklist - User defined (blackList)
{% for element in OPNsense.proxy.forward.acl.blackList.split(",") %}
{% if ('^' or '\\' or '$' or '[') in element %}
{% if ('^' or '\' or '$' or '[') in element %}
acl blackList url_regex {{element}}
{% else %}
acl blackList url_regex .+{{element|replace(".","\.")}}
acl blackList url_regex {{element|replace(".","\.")}}
{% endif %}
{% endfor %}
{% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment