refuse unlisted squid names before any destination lookup
This commit is contained in:
parent
5513a6e875
commit
078aed1335
1 changed files with 11 additions and 4 deletions
|
|
@ -461,7 +461,7 @@ let
|
|||
}
|
||||
{
|
||||
# First match wins, so a destination deny after the allow is dead.
|
||||
name = "squid denies loopback, link-local and bridge destinations before any destination allow";
|
||||
name = "squid refuses unlisted names, then loopback, link-local and bridge destinations, before any allow";
|
||||
ok =
|
||||
let
|
||||
lines = lib.splitString "\n" hiveOtel.services.squid.configText;
|
||||
|
|
@ -475,6 +475,8 @@ let
|
|||
&& at "http_access deny to_linklocal" < allow
|
||||
&& at "http_access deny to_bridge" != null
|
||||
&& at "http_access deny to_bridge" < allow
|
||||
&& at "http_access deny !allowed_dst" != null
|
||||
&& at "http_access deny !allowed_dst" < at "http_access deny to_localhost"
|
||||
&& builtins.elem "cache deny all" lines
|
||||
&& lib.last (lib.filter (l: l != "") lines) == "http_access deny all";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue