Skip Menu |

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

Report information
The Basics
Id: 44699
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Net-OAuth

People
Owner: kgrennan [...] cpan.org
Requestors: stijnprompers [...] gmail.com
Cc:
AdminCc:

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



Subject: bug report
Date: Tue, 31 Mar 2009 14:49:53 +0200
To: bug-Net-OAuth [...] rt.cpan.org
From: Stijn Prompers <stijnprompers [...] gmail.com>
Dear reader, I think I discovered a bug in Net::OAuth version 0.14. When supplying "extra_parameters" containing spaces to a Request, and calling the to_url() method, the spaces are encoded as '+', rather than "%20", as in the OAuth spec. This leads to authentication errors (since the encoding in the signature_base_string() is correct). Replacing the query_param() call in Message.pm (from line 260) fixed this problem for me (code included below). Feel free to contact me if you have any remarks or questions. Kind regards, Stijn Prompers require URI; #require URI::QueryParam; #$uri = URI->new("$uri"); my $params = $self->to_hash; my $sep = '?'; foreach my $k (sort keys %$params) { #$uri->query_param($k, $params->{$k}); $uri .= $sep . encode($k) . '=' . encode( $params->{$k} ); $sep = '&' if $sep eq '?'; } return new URI( "$uri" ); Additional info: perl, v5.8.8 built for MSWin32-x86-multi-thread. Binary build 822 [280952] provided by ActiveState Windows XP Professional, sp2
Fixed in Net::OAuth 0.15 Thanks for your bug report. Really appreciate it! Best, Keith