Bugzilla – Attachment 17529 Details for
Bug 10074
Encoding problems for login and installer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 10074 - Encoding problems in templates
SIGNED-OFF-Bug-10074---Encoding-problems-in-templa.patch (text/plain), 1.68 KB, created by
Bernardo Gonzalez Kriegel
on 2013-04-18 18:33:15 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 10074 - Encoding problems in templates
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-04-18 18:33:15 UTC
Size:
1.68 KB
patch
obsolete
>From 5db883449a0c03ab6268ffd7095b5a8f8358dfaa Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Thu, 18 Apr 2013 15:07:40 -0300 >Subject: [PATCH] [SIGNED-OFF] Bug 10074 - Encoding problems in templates >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Bug 6554 patched output_with_http_headers to encode utf8 data, and Templates.pm to expect utf8 data to be encoded. >(At least) the staff login screen outputs directly to STDOUT (Auth.pm does, WHICH IS WRONG!) and wasn't fixed to do the encoding first. > >This patch adds the encode step (using Encode::encode) and that's it. > >Regards >To+ > >Sponsored-by: Universidad Nacional de Córdoba >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Small patch, fixes annoying error. No koha-qa errors. >--- > C4/Auth.pm | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ca061b5..fafb5de 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -19,10 +19,13 @@ package C4::Auth; > > use strict; > use warnings; >+ > use Digest::MD5 qw(md5_base64); > use Storable qw(thaw freeze); > use URI::Escape; > use CGI::Session; >+use Encode; >+use Carp; > > require Exporter; > use C4::Context; >@@ -1067,12 +1070,15 @@ sub checkauth { > $template->param( %info ); > # $cookie = $query->cookie(CGISESSID => $session->id > # ); >+ my $data = $template->output; >+ eval { $data = encode('UTF-8',$data,Encode::FB_CROAK); }; >+ if ($@) { carp "UTF8 encoding error: $@" }; > print $query->header( > -type => 'text/html', > -charset => 'utf-8', > -cookie => $cookie > ), >- $template->output; >+ $data; > safe_exit; > } > >-- >1.7.9.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 10074
:
17527
|
17528
|
17529
|
17530
|
17531
|
17532
|
17533
|
17534
|
17542
|
17545
|
17546
|
17548
|
17549
|
17550