From 4fc4f861408deeeb2bf0100ac65ba2718b6499a3 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 23 Oct 2009 17:26:46 -0700 Subject: [PATCH] Fix use of module-level variable --- web-lib-funcs.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index c7eed88c5..a87005f42 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -3738,10 +3738,12 @@ if ($ENV{'HTTP_REFERER'} =~/^(http|https|ftp):\/\/([^:\/]+:[^@\/]+@)?([^\/:@]+)/ } my $http_host = $ENV{'HTTP_HOST'}; $http_host =~ s/:\d+$//; +my $unsafe_index = $unsafe_index_cgi || + &get_module_variable('$unsafe_index_cgi'); if ($0 && - ($ENV{'SCRIPT_NAME'} !~ /^\/(index.cgi)?$/ || $unsafe_index_cgi) && + ($ENV{'SCRIPT_NAME'} !~ /^\/(index.cgi)?$/ || $unsafe_index) && ($ENV{'SCRIPT_NAME'} !~ /^\/([a-z0-9\_\-]+)\/(index.cgi)?$/i || - $unsafe_index_cgi) && + $unsafe_index) && $0 !~ /(session_login|pam_login)\.cgi$/ && !$gconfig{'referer'} && $ENV{'MINISERV_CONFIG'} && !$main::no_referers_check && $ENV{'HTTP_USER_AGENT'} !~ /^Webmin/i &&