From 23e79c9b263391e2305e7df7ac89c05bf133f416 Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Thu, 24 Jan 2013 20:30:09 -0200 Subject: Fix creation of acl noauth --- config/squid/squid.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 54e87c1a..00d6c1cf 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -1041,9 +1041,12 @@ function squid_resync_auth() { $conf .= "http_access allow $acl\n"; } else { - $noauth = implode(' ', explode("\n", base64_decode($settings['no_auth_hosts']))); + $noauth = base64_decode($settings['no_auth_hosts']); if (!empty($noauth)) { - $conf .= "acl noauth src $noauth\n"; + foreach (split("\n", $noauth) as $host) { + $host = trim($host); + $conf .= "acl noauth src $host\n"; + } $valid_acls[] = 'noauth'; } -- cgit v1.2.3 From 4c1748a29889bba8fccadb18926a6c7ae1eec5fd Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Thu, 24 Jan 2013 22:28:44 -0200 Subject: Revert "Fix creation of acl noauth" This reverts commit 23e79c9b263391e2305e7df7ac89c05bf133f416. --- config/squid/squid.inc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 00d6c1cf..54e87c1a 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -1041,12 +1041,9 @@ function squid_resync_auth() { $conf .= "http_access allow $acl\n"; } else { - $noauth = base64_decode($settings['no_auth_hosts']); + $noauth = implode(' ', explode("\n", base64_decode($settings['no_auth_hosts']))); if (!empty($noauth)) { - foreach (split("\n", $noauth) as $host) { - $host = trim($host); - $conf .= "acl noauth src $host\n"; - } + $conf .= "acl noauth src $noauth\n"; $valid_acls[] = 'noauth'; } -- cgit v1.2.3 From 2815b751056a604ecff6dfc6e7a94c6db750cfb2 Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Thu, 24 Jan 2013 22:45:36 -0200 Subject: Fix creation of acl noauth --- config/squid/squid.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 54e87c1a..6decbfb6 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -1041,9 +1041,12 @@ function squid_resync_auth() { $conf .= "http_access allow $acl\n"; } else { - $noauth = implode(' ', explode("\n", base64_decode($settings['no_auth_hosts']))); + $noauth = base64_decode($settings['no_auth_hosts']); if (!empty($noauth)) { - $conf .= "acl noauth src $noauth\n"; + foreach (explode("\n", $noauth) as $host) { + $host = trim($host); + $conf .= "acl noauth src $host\n"; + } $valid_acls[] = 'noauth'; } -- cgit v1.2.3 From 7dd26da21739390216c013c0a3b0758b716ea7f8 Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Thu, 24 Jan 2013 23:11:26 -0200 Subject: Fix tabs --- config/squid/squid.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 6decbfb6..960bad67 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -1043,8 +1043,8 @@ function squid_resync_auth() { else { $noauth = base64_decode($settings['no_auth_hosts']); if (!empty($noauth)) { - foreach (explode("\n", $noauth) as $host) { - $host = trim($host); + foreach (explode("\n", $noauth) as $host) { + $host = trim($host); $conf .= "acl noauth src $host\n"; } $valid_acls[] = 'noauth'; -- cgit v1.2.3