From 7c4861c0cb84cb5d6300b1b28d5e47a646247870 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. --- 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.10.4