version 1.43.2.4, 2020/01/06 15:55:06
|
version 1.43.2.7, 2020/09/06 19:29:00
|
Line 227 else {
|
Line 227 else {
|
} |
} |
my $hostname = Sys::Hostname::FQDN::fqdn(); |
my $hostname = Sys::Hostname::FQDN::fqdn(); |
my $hostip = Socket::inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost'); |
my $hostip = Socket::inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost'); |
my @expected = ('RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:\/\/)', |
my @expected = ('RewriteEngine on', |
|
'RewriteCond %{HTTPS} =on', |
|
'RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:)', |
'RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)', |
'RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)', |
'RewriteRule ^/adm/wrapper/ext/(?!https:\/\/) http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]', |
'RewriteRule ^/adm/wrapper/ext/(?!https:) http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]', |
'RewriteCond %{REMOTE_ADDR} 127.0.0.1', |
'RewriteCond %{REMOTE_ADDR} 127.0.0.1', |
'RewriteRule (.*) - [L]'); |
'RewriteRule (.*) - [L]'); |
if (($hostip ne '') && ($hostip ne '127.0.0.1')) { |
if (($hostip ne '') && ($hostip ne '127.0.0.1')) { |
Line 283 else {
|
Line 285 else {
|
foreach my $item (@rewrites) { |
foreach my $item (@rewrites) { |
if (ref($item) eq 'ARRAY') { |
if (ref($item) eq 'ARRAY') { |
my $found = 0; |
my $found = 0; |
foreach my $item (@rewrites) { |
foreach my $line (@{$item}) { |
foreach my $match (@expected) { |
foreach my $match (@expected) { |
if ($match eq $item) { |
if ($match eq $line) { |
$found ++; |
$found ++; |
last; |
last; |
} |
} |
Line 293 else {
|
Line 295 else {
|
} |
} |
if ($found >= @expected) { |
if ($found >= @expected) { |
$gotrules = 1; |
$gotrules = 1; |
|
last; |
} |
} |
} |
} |
} |
} |