зеркало из https://github.com/mozilla/pjs.git
Handle edge cases of dirname(SCRIPT_NAME) results.
Bug #343534 r=timeless
This commit is contained in:
Родитель
69527fd4de
Коммит
31ce9c449b
|
@ -1085,6 +1085,8 @@ sub validateReferer {
|
||||||
my $found = 0;
|
my $found = 0;
|
||||||
my $script_path = dirname($ENV{'SCRIPT_NAME'});
|
my $script_path = dirname($ENV{'SCRIPT_NAME'});
|
||||||
my $referer = $ENV{'HTTP_REFERER'} || "";
|
my $referer = $ENV{'HTTP_REFERER'} || "";
|
||||||
|
# Handle edge cases
|
||||||
|
$script_path =~ s@^[/\.]$@@;
|
||||||
|
|
||||||
foreach $script (@scripts) {
|
foreach $script (@scripts) {
|
||||||
$found++ if
|
$found++ if
|
||||||
|
|
Загрузка…
Ссылка в новой задаче