Export to GitHub

oauth-php - issue #94

oauth_token wil special characters


Posted on Jan 11, 2011 by Swift Cat

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!

Comment #1

Posted on Jan 14, 2011 by Massive Lion

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

Status: Accepted

Labels:
Type-Defect Priority-Medium