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

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

People
Owner:
crew [...] cs.stanford.edu
Requestors:
andrey [...] kostenko.name
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
1.03
Fixed in:
  • 1.030099_006
  • 1.11



Subject: Wide characters at subroutine entry
If I retrieve firstname from gmail via attribute exchange extension, I receive error "Wide characters at subroutine entry", because my name is Андрiй and Digest::SHA1::sha1 does not know what to do with that characters :-) I've uploaded a patch for it. Also I've switched Crypt::DH dependency to Crypt::DH::GMP (wrong deps of Crypt::DH enrage me).
Subject: gmp.patch
diff --git a/Makefile.PL b/Makefile.PL index 63a7294..879f6c6 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,7 +9,7 @@ WriteMakefile( 'NAME' => 'Net::OpenID::Consumer', 'URI' => 0, 'Time::Local' => 0, 'XML::Simple' => 0, - 'Crypt::DH' => 0.05, + 'Crypt::DH::GMP' => '0.0.5' }, ($] >= 5.005 ? (ABSTRACT_FROM => 'lib/Net/OpenID/Consumer.pm', diff --git a/lib/Net/OpenID/Association.pm b/lib/Net/OpenID/Association.pm index 61f32b0..f019f2f 100644 --- a/lib/Net/OpenID/Association.pm +++ b/lib/Net/OpenID/Association.pm @@ -12,6 +12,7 @@ use fields ( ); use Storable (); +use Crypt::DH::GMP 0.0.5; use Digest::SHA1 qw(sha1); sub new { @@ -215,7 +216,7 @@ sub invalidate_handle { } sub _default_dh { - my $dh = Crypt::DH->new; + my $dh = Crypt::DH::GMP->new; $dh->p("155172898181473697471232257763715539915724801966915404479707795314057629378541917580651227423698188993727816152646631438561595825688188889951272158842675419950341258706556549803580104870537681476726513255747040765857479291291572334510643245094715007229621094194349783925984760375594985848253359305585439638443"); $dh->g("2"); $dh->generate_keys; diff --git a/lib/Net/OpenID/Consumer.pm b/lib/Net/OpenID/Consumer.pm index 204ec38..45300ca 100644 --- a/lib/Net/OpenID/Consumer.pm +++ b/lib/Net/OpenID/Consumer.pm @@ -33,7 +33,6 @@ use Net::OpenID::URIFetch; use MIME::Base64 (); use Digest::SHA1 (); -use Crypt::DH 0.05; use Time::Local; use HTTP::Request; @@ -808,7 +807,7 @@ sub verified_identity { $token .= "$param:$val\n"; $signed_fields{$param} = $val; } - + utf8::encode( $token ); my $good_sig = OpenID::util::b64(OpenID::util::hmac_sha1($token, $assoc->secret)); return $self->_fail("signature_mismatch") unless $sig64 eq $good_sig;
I believe this is fixed in Net-OpenID-Consumer-1.11 If you want to try it out, please make sure you've also installed the latest Net-OpenID-Common. Feel free to re-open (or start a new ticket) if I'm mistaken about this. Thanks for the report and sorry this took so long to get to... - Roger Crew (new co-maintainer as of a few weeks ago)


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.