php.net |  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
Votes:2
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:
Package:
Bug Type:
Summary:
From: archuleta at seqcentral dot com
New email:
PHP Version: OS:

 

 [2011-04-20 11:31 UTC] archuleta at seqcentral dot com
Description:
------------
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:
---------------
$consumer->fetch("http://localhost/oauth?a[b][c]=d");
// 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();
$provider->is2LeggedEndpoint(true);
$provider->consumerHandler('lookupConsumer');
$provider->timestampNonceHandler('timestampNonceHandler');
$provider->checkOAuthRequest();




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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-13 20:16 UTC] datibbaw@php.net
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] datibbaw@php.net
Sorry, didn't read the bug properly ;)
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 13 21:01:24 2019 UTC