gcode-mirror / oauth-php

Automatically exported from code.google.com/p/oauth-php
MIT License
0 stars 0 forks source link

oauth_token wil special characters #94

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi everyone,

If the oauth_token that is given by the provider (Yahoo, Google...) contains 
special char like "/" (example google token 4/-mHqP0j2743mRoP6XT2pjEbkrFrX).
The provider will answer with a bad token.

In fact, it seems that the oauth_token is urlencoded too many times. 
In most case, there is no problem because oauth_token provided contains only 
alphanumeric value.

To correct that issue, I changed the OAuthRequesterSigner::sign method and 
replaced :

if (!$token) {
   $token = $this->getParam('oauth_token');
}

by this :
if (!$token) {
   $token = urldecode($this->getParam('oauth_token'));
}

Hope it helps!

Original issue reported on code.google.com by florian....@gmail.com on 11 Jan 2011 at 3:11

GoogleCodeExporter commented 9 years ago
I'm checking it. The bug is acknowledged, but I need to see if the patch may 
break something else... Thanks!

Original comment by brunobg%...@gtempaccount.com on 14 Jan 2011 at 11:48