[Patches] [PATCH] Bug 6628 : Stopping a potential vulnerability

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Sat Nov 26 07:45:02 NZDT 2011


From: Chris Cormack <chrisc at catalyst.net.nz>
Date: Sat, 26 Nov 2011 07:39:51 +1300
Subject: [PATCH] Bug 6628 : Stopping a potential vulnerability

---
 help.pl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/help.pl b/help.pl
index 18d27dd..74f53ef 100755
--- a/help.pl
+++ b/help.pl
@@ -32,7 +32,9 @@ our $refer = $query->param('url');
 $refer = $query->referer()  if !$refer || $refer eq 'undefined';
 
 $refer =~ /koha\/(.*)\.pl/;
-my $from = "help/$1.tt";
+my $file = $1;
+$file =~ s/[^a-zA-Z_\-\/]*//g; 
+my $from = "help/$file.tt";
 
 my $template = C4::Templates::gettemplate($from, 'intranet', $query);
 $template->param( referer => $refer );
-- 
1.7.5.4


More information about the Patches mailing list