[Patches] [PATCH] Bug 6629 : Follow up, sanitising in a couple more places

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Mon Nov 28 15:20:07 NZDT 2011


From: Chris Cormack <chrisc at catalyst.net.nz>
Date: Sun, 27 Nov 2011 21:58:04 +1300
Subject: [PATCH] Bug 6629 : Follow up, sanitising in a couple more places
Content-Type: text/plain; charset="UTF-8"

Signed-off-by: Jared Camins-Esakov <jcamins at cpbibliography.com>
---
 installer/install.pl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/installer/install.pl b/installer/install.pl
index 5b065e8..ae478b6 100755
--- a/installer/install.pl
+++ b/installer/install.pl
@@ -229,6 +229,7 @@ elsif ( $step && $step == 3 ) {
         # Framework Selection is achieved through checking boxes.
         my $langchoice = $query->param('fwklanguage');
         $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
+	$langchoice =~ s/[^a-zA-Z_-]*//g;
         my $marcflavour = $query->param('marcflavour');
         if ($marcflavour){
             $installer->set_marcflavour_syspref($marcflavour);
@@ -266,6 +267,7 @@ elsif ( $step && $step == 3 ) {
         # Marcflavour Selection is achieved through radiobuttons.
         my $langchoice = $query->param('fwklanguage');
         $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
+	$langchoice =~ s/[^a-zA-Z_-]*//g;
         my $dir =
           C4::Context->config('intranetdir') . "/installer/data/$info{dbms}/$langchoice/marcflavour";
         unless (opendir( MYDIR, $dir )) {
-- 
1.7.2.5


More information about the Patches mailing list