From c68890013c16821f94af02d4a7a660bb9c1a072e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 14 Mar 2014 15:55:04 +0100 Subject: [PATCH] Bug 11944: Library name variable should be decoded Test on preferences.pl and on some others pages when mysql is used to store session. Signed-off-by: Paola Rossi Signed-off-by: Bernardo Gonzalez Kriegel --- C4/Context.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Context.pm b/C4/Context.pm index 71a0f8c..965c1ed 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -1117,7 +1117,9 @@ set_userenv is called in Auth.pm #' sub set_userenv { - my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress, $branchprinter, $persona)= @_; + my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress, $branchprinter, $persona) = + map { Encode::is_utf8( $_ ) ? $_ : Encode::decode('UTF-8', $_) } # CGI::Session doesn't handle utf-8, so we decode it here + @_; my $var=$context->{"activeuser"} || ''; my $cell = { "number" => $usernum, -- 1.7.9.5