mirror of
https://github.com/webmin/webmin.git
synced 2026-06-27 14:30:25 +01:00
Fix to store redirects more reliably
This commit is contained in:
@@ -4924,7 +4924,8 @@ else {
|
||||
$trust = 0;
|
||||
}
|
||||
# Check for trigger URL to simply redirect to root: required for Authentic Theme 19.00+
|
||||
if ($ENV{'HTTP_X_REQUESTED_WITH'} ne "XMLHttpRequest" &&
|
||||
if (!$main::redirect_built &&
|
||||
$ENV{'HTTP_X_REQUESTED_WITH'} ne "XMLHttpRequest" &&
|
||||
$ENV{'REQUEST_URI'} !~ /xhr/ &&
|
||||
$ENV{'REQUEST_URI'} !~ /pjax/ &&
|
||||
$ENV{'REQUEST_URI'} !~ /link.cgi\/\d+/ &&
|
||||
@@ -4949,10 +4950,11 @@ if ($ENV{'HTTP_X_REQUESTED_WITH'} ne "XMLHttpRequest" &&
|
||||
$url = "/" . $url . "/";
|
||||
}
|
||||
}
|
||||
# Append hex URL representation to stored file name, to process multiple, simultaneous requests
|
||||
my $url_salt = substr(unpack("H*", $url), -180);
|
||||
# Append hex URL representation to stored file name, to process multiple, simultaneous requests
|
||||
my $url_salt = int(rand() * 10000000);
|
||||
$var{$key} = $url;
|
||||
write_file(tempname('.theme_' . $salt . '_' . $url_salt . '_' . get_product_name() . '_' . $key . '_' . $remote_user), \%var);
|
||||
$main::redirect_built++
|
||||
}
|
||||
&redirect($gconfig{'webprefix'} . "/");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user