|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-05-13 20:16 UTC] datibbaw@php.net
[2011-05-14 01:28 UTC] datibbaw@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
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