From 31ce9c449b42c2ba647d1a92f608e0de71d49831 Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Fri, 7 Jul 2006 14:06:04 +0000 Subject: [PATCH] Handle edge cases of dirname(SCRIPT_NAME) results. Bug #343534 r=timeless --- webtools/bonsai/globals.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webtools/bonsai/globals.pl b/webtools/bonsai/globals.pl index 97ef5cc96b7..c03e249ed81 100644 --- a/webtools/bonsai/globals.pl +++ b/webtools/bonsai/globals.pl @@ -1085,6 +1085,8 @@ sub validateReferer { my $found = 0; my $script_path = dirname($ENV{'SCRIPT_NAME'}); my $referer = $ENV{'HTTP_REFERER'} || ""; + # Handle edge cases + $script_path =~ s@^[/\.]$@@; foreach $script (@scripts) { $found++ if