This queue is for tickets about the Net-OpenID-Consumer CPAN distribution.

Report information
The Basics
Id:
80329
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
EKOS [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
(no value)
Fixed in:
1.14



There seems to be a problem with this module when using the AX openid extension (and probably sreg as well), and server response contains utf-8 data (e.g. cyrillic characters). An exception is thrown, saying something like: "Caught exception in MyModule->openid "Can't escape \x{043B}, try uri_escape_utf8() instead at /usr/local/share/perl5/Net/OpenID/Consumer.pm line 980"". Changing uri_escape to uri_escape_utf8 (as the error message sais) actually helps.
Subject: uri_escape.patch
diff --git a/lib/Net/OpenID/Consumer.pm b/lib/Net/OpenID/Consumer.pm index dfefa30..7821092 100644 --- a/lib/Net/OpenID/Consumer.pm +++ b/lib/Net/OpenID/Consumer.pm @@ -38,7 +38,7 @@ use HTTP::Request; use LWP::UserAgent; use Storable; use JSON qw(encode_json); -use URI::Escape qw(uri_escape); +use URI::Escape qw(uri_escape_utf8); use HTML::Parser; sub new { @@ -973,7 +973,7 @@ sub verified_identity { my $req = HTTP::Request->new(POST => $server); $req->header("Content-Type" => "application/x-www-form-urlencoded"); - $req->content(join("&", map { "$_=" . uri_escape($post{$_}) } keys %post)); + $req->content(join("&", map { "$_=" . uri_escape_utf8($post{$_}) } keys %post)); my $ua = $self->ua; my $res = $ua->request($req);
I've also sent you a pull request on github. There you can find the attached fix plus an extra regression test file. Hope this helps in a quick problem resolution.
On Mon Oct 22 05:08:37 2012, EKOS wrote:
Show quoted text
> I've also sent you a pull request on github.
I'm posting the link to it just in case someone takes this module over. https://github.com/wrog/Net-OpenID-Consumer/pull/2
pull request applied. thanks (and sorry this took so long)


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.