|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
35 - 9 = ?
Subscribe to this entry?

 [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-2020 The PHP Group
All rights reserved.
Last updated: Mon May 25 11:01:24 2020 UTC