Bugzilla – Attachment 6444 Details for
Bug 6628
[security] help system use insecure REFERRER for file inclusion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[3.4.x] Bug 6628 fixing security vulnerability
0001-3.4.x-Bug-6628-fixing-security-vulnerability.patch (text/plain), 1.50 KB, created by
Sébastien Marie
on 2011-11-28 10:32:32 UTC
(
hide
)
Description:
[3.4.x] Bug 6628 fixing security vulnerability
Filename:
MIME Type:
Creator:
Sébastien Marie
Created:
2011-11-28 10:32:32 UTC
Size:
1.50 KB
patch
obsolete
>From 99247433c5c58612beb8a93100df693403822c2a Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Sat, 26 Nov 2011 07:39:51 +1300 >Subject: [PATCH] [3.4.x] Bug 6628 fixing security vulnerability >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr> > - patch taken from master > - I also corrected two invalid calls to themelanguage (tests are not possible else) >--- > help.pl | 8 +++++--- > 1 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/help.pl b/help.pl >index 7208a8a..bb9c043 100755 >--- a/help.pl >+++ b/help.pl >@@ -32,13 +32,15 @@ our $refer = $query->param('url'); > $refer = $query->referer() if !$refer || $refer eq 'undefined'; > > $refer =~ /koha\/(.*)\.pl/; >-my $from = "modules/help/$1.tt"; >+my $file = $1; >+$file =~ s/[^a-zA-Z0-9_\-\/]*//g; >+my $from = "modules/help/$file.tt"; > > my $htdocs = C4::Context->config('intrahtdocs'); >-my ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query ); >+my ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); > unless ( -e "$htdocs/$theme/$lang/$from" ) { > $from = "modules/help/nohelp.tt"; >- ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query ); >+ ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); > } > my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from"); > $template->param( referer => $refer ); >-- >1.7.2.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6628
:
6413
|
6417
|
6440
|
6443
| 6444