Bugzilla – Attachment 6398 Details for
Bug 6629
[security] insecure use of Cookie for language selection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
quick patch
quick.patch (text/plain), 820 bytes, created by
Sébastien Marie
on 2011-11-25 05:51:57 UTC
(
hide
)
Description:
quick patch
Filename:
MIME Type:
Creator:
Sébastien Marie
Created:
2011-11-25 05:51:57 UTC
Size:
820 bytes
patch
obsolete
>diff --git a/C4/Templates.pm b/C4/Templates.pm >index eaec07d..1221600 100644 >--- a/C4/Templates.pm >+++ b/C4/Templates.pm >@@ -181,6 +181,9 @@ sub themelanguage_lite { > $lang = $query->cookie('KohaOpacLanguage') > if ( defined $query and $query->cookie('KohaOpacLanguage') ); > >+ # Sanitize the user input >+ $lang =~ s/[^a-zA-Z_-]*//; >+ > # Fall back to English > my @languages; > if ( $interface eq 'intranet' ) { >@@ -324,6 +327,10 @@ sub themelanguage { > if $http_accept_language; > # But, if there's a cookie set, obey it > $lang = $query->cookie('KohaOpacLanguage') if (defined $query and $query->cookie('KohaOpacLanguage')); >+ >+ # Sanitize the user input >+ $lang =~ s/[^a-zA-Z_-]*//; >+ > # Fall back to English > my @languages; > if ($interface eq 'intranet') {
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 6629
:
6398
|
6399
|
6400
|
6401
|
6402
|
6403
|
6404
|
6405
|
6406
|
6411
|
6412
|
6422
|
6423
|
6424
|
6427
|
6428
|
6432