Error parsing acl with parameters in external file

155 views
Skip to first unread message

alexandre...@gmail.com

unread,
Nov 15, 2017, 3:07:51 AM11/15/17
to Diladele Web Safety

Hello!

My system:
CentOS Linux release 7.4.1708 (Core)
Squid Cache: Version 3.5.27
Web Safety for Squid Proxy, version 5.2.0.210A-x86_64-linux-centos7

On Web UI page - Squid Proxy -> Settings -> Default ACLs
I add to the section acl:  acl temp_user src "/etc/squid/sq.ip_temp_user"
This file exist and contains some IPs.
After saving the settings, I apply the changes and restart the websafety.
But restart is not successful! I see error:
2017/11/15 10:18:42| Processing: acl temp_user src "/etc/conf_srv/squid/sq.ip_temp_user"
2017/11/15 10:18:42| aclIpParseIpData: unknown first address in '"/etc/conf_srv/squid/sq.ip_temp_user"'
FATAL: Bungled /opt/websafety/etc/squid/access_controls.conf line 546: acl temp_user src "/etc/conf_srv/squid/sq.ip_temp_user"
Squid Cache (Version 3.5.27): Terminated abnormally.


I check the file /opt/websafety/etc/squid/access_controls.conf

my acl is written as: acl temp_user src "/etc/conf_srv/squid/sq.ip_temp_user"
Instead of quotes written HTML entity.
I fixed HTML Entity to quotes in this file and the restart websafety was successful.
I think this is a bug.

Alexandre.

rafael....@diladele.com

unread,
Nov 15, 2017, 4:21:22 AM11/15/17
to Diladele Web Safety
Hello Alexander,

Indeed, added https://github.com/diladele/websafety-issues/issues/481 will process during today.

Raf

rafael....@diladele.com

unread,
Nov 15, 2017, 4:22:49 AM11/15/17
to Diladele Web Safety
As a workaround please try using advanced in for example UI  / Squid / ICAP / Advanced...

rafael....@diladele.com

unread,
Nov 15, 2017, 4:31:39 AM11/15/17
to Diladele Web Safety
Fixed in new 6.0 to be on site later today;
Workaround for older versions:

Workaround - in /opt/websafety/var/console/squid/templates/squid/conf/access_controls.conf at line 540 and several lines below you need to wrap it with {% autoescape off %} and {% endautoescape %} django template directives so that it looks like:

# advanced acl written as-is without autoescape
{% autoescape off %}
{% if acldefault.advanced_acl %}{{acldefault.advanced_acl}}
{% else %}# no advanced acls specified
{% endif %}
{% endautoescape %}



alexandre...@gmail.com

unread,
Nov 15, 2017, 4:57:51 AM11/15/17
to Diladele Web Safety
Confirm Workaround.

restart successful!



среда, 15 ноября 2017 г., 12:31:39 UTC+3 пользователь rafael....@diladele.com написал:
Reply all
Reply to author
Forward
0 new messages