|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59725 OAuthProvider not accepting multi-dimensional query params
Submitted: 2011-04-20 11:31 UTC Modified: 2011-05-14 01:28 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: archuleta at seqcentral dot com Assigned:
Status: Open Package: oauth (PECL)
PHP Version: 5.3.5 OS: Mac OS 10.5.8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: archuleta at seqcentral dot com
New email:
PHP Version: OS:


 [2011-04-20 11:31 UTC] archuleta at seqcentral dot com
Sending a query parameter such as, "oauth?a[b][c]=d", to the 
OAuthProvider::checkOAuthRequest results in an "Array to 
String" exception.

The cause for this appears to be that OAuth first converts the 
query param into a multi-dimensional array, and then creates 
the signature. (

Instead of trying to convert to an object/array first, I think 
OAuthProvider should treat the params as a 1-D key-value array 
where some of the keys happen to have '[' and ']'.

Reproduce code:
// Note that the below fails on fetch even though it's the "same" as the above (Bug 17572)
// $consumer->fetch("http://localhost/oauth", array('a' => array('b' => array('c' => 'd'))));

$provider = new OAuthProvider();

Actual result:
ErrorException [ Notice ]: Array to string conversion


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-13 20:16 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PECL.

This question has been addressed in #17572
 [2011-05-14 01:28 UTC]
Sorry, didn't read the bug properly ;)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 20:01:31 2024 UTC