Permalink
Browse files

[#21464023] Security: arbitrary file inclusion

Poor input cleansing can allow a well-constructed cookie
to return the contents of arbitrary file system objects.
  • Loading branch information...
1 parent 3dae752 commit c3b1a285fb045fb72139981675955b5029917d1a @ctfliblime ctfliblime committed Nov 25, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/C4/Output.pm
View
@@ -143,6 +143,7 @@ sub themelanguage {
if $http_accept_language;
# But, if there's a cookie set, obey it
$lang = $query->cookie('KohaOpacLanguage') if $query->cookie('KohaOpacLanguage');
+ $lang =~ s/[^\p{IsAlnum}\-_]//g;
# Fall back to English
my @languages;
if ($interface eq 'intranet') {

0 comments on commit c3b1a28

Please sign in to comment.