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

Report information
The Basics
Id:
57849
Status:
resolved
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
Critical
Broken in:
0.25
Fixed in:
(no value)



Subject: incorrect decoding for UTF-8 strings (double decoding)
here is double-decoding code as in Net::OAuth::Message::encode() if (Encode::is_utf8($str)) { $str = Encode::decode_utf8($str, 1); } please note that; - Encode::is_utf8($str) returns true if $str is a (decoded) "string". - Encode::decode_utf8($str) decodes "UTF-8 octets" into "string". so, the code above means "if $str is a string, decode it as a UTF-8 octets." it's double-decoding. if you want to get "string" here, change the code as below; if ( !Encode::is_utf8($str) ) { $str = Encode::decode_utf8($str, 1); } thx.
Hi, this is pretty critical, as it renders Net::Twitter with OAuth completely useless for multi-byte character oriented people like us. It's a one-byte fix, can you please make release?
Hi everyone, Thanks for letting me know about this and sorry for the delayed fix (I have a 4-week old baby and I'm more busy than usual). This is fixed in Net-OAuth-0.26 - Message::encode() now just warns you if you try to pass in non-decoded 8-bit characters. Feel free to send me some unit tests - I'd love to have some real-world unicode test cases with the Net::OAuth test suite. All I have right now is t/09-encoding.t, which is very basic. Best regards, Keith


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.