diff --git a/convert.pl b/convert.pl old mode 100644 new mode 100755 index a78b2e9..b4aa7e9 --- a/convert.pl +++ b/convert.pl @@ -31,6 +31,8 @@ while (<>) { # replaced with the current one down the line. s/${1}${s}(Deny${s}from${s}all)/$1/i; s/${1}${s}(Allow${s}from${s}localhost.*)/$1/i; + # When someone was mixing directives + s/${1}${s}(Require*)/$1/i; }; # ** Satisfy @@ -50,7 +52,8 @@ while (<>) { s/Deny${s}from${s}all/Require all denied/i; }; - s/Deny${s}from${s}env=/Require not env /i; + # https://bz.apache.org/bugzilla/show_bug.cgi?id=60946 + s/Deny${s}from${s}env=(!?)(\S+)/ "Require expr \"-".( $1 ? "n" : "z")." %{reqenv:$2}\""/ei; # ** Allow s/Allow${s}from${s}all/Require all granted/i;