Skip Menu |

This queue is for tickets about the Catalyst-Plugin-AuthenCookie CPAN distribution.

Report information
The Basics
Id: 49628
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-AuthenCookie

People
Owner: Nobody in particular
Requestors: tomas.znamenacek [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Cookie validation fails for Unicode strings
Cookie validation fails when the cookie contains some Unicode characters: set_authen_cookie(value => {string => 'Krůta'}); Now authen_cookie_value returns undef. This can be worked around like this: set_authen_cookie(value => {string => encode_base64(encode_utf8('Krůta'))}); And of course now I have to decode the string back on the other end.
On Fri Sep 11 11:31:55 2009, tomas.znamenacek@gmail.com wrote: Show quoted text
> Cookie validation fails when the cookie contains some Unicode characters: > > set_authen_cookie(value => {string => 'Krůta'}); > > Now authen_cookie_value returns undef. This can be worked around like
this: Show quoted text
> > set_authen_cookie(value => {string =>
encode_base64(encode_utf8('Krůta'))}); Show quoted text
> > And of course now I have to decode the string back on the other end.
The problem is with CGI::Simple::Cookie and its escaping mechanism. It needs to either encode the data before escaping, or decode it as utf8 after escaping. I'd suggest filing a bug with that package.
I'm going to close this ticket since it's not a problem with this module (directly). Please don't reply to the ticket or it will be re-opened. Thanks, -dave