preumich / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

php: arrays in post data #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When php receives parameter like 'a[b]=test', 
it creates for it entry like 'a' => array('b' => 'test'). 

OAuthRequest is initialized with $_POST or $_GET values,
thus sometimes it receives arrays as parameter value. 
It's not easy to escape an array or use it in signature ; ) 

OAuthRequest needs to be initialized with array 
having only scalars as values. 

Following patch implements OAuthRequest::get_flat_post()
method and uses it to populate OAuthRequest parameters.

Original issue reported on code.google.com by atregoub...@gmail.com on 31 Mar 2008 at 3:40

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by andyster on 15 Jul 2008 at 11:17

GoogleCodeExporter commented 9 years ago
I have created a patch that enables arrays in input, instead of just flattening 
arrays so the issues wont arise. 
There might still be some issues with converting the parameters back into 
urls/header but at least the signature 
will be correctly formed/verified.

http://groups.google.com/group/oauth-php/browse_thread/thread/6ad5dbc450401544

Original comment by morten.f...@gmail.com on 26 Jan 2009 at 10:45

GoogleCodeExporter commented 9 years ago

Original comment by morten.f...@gmail.com on 30 Jan 2009 at 7:01

GoogleCodeExporter commented 9 years ago
Any idea when this patch will be checked in?

Original comment by chiragsh...@gmail.com on 4 Feb 2009 at 11:50

GoogleCodeExporter commented 9 years ago
chriragshah1: Hopefully soon. It has passed QA, so it should be in within the 
next couple of days.. 

Original comment by morten.f...@gmail.com on 5 Feb 2009 at 1:13

GoogleCodeExporter commented 9 years ago
Patch commited in rev. 888
http://code.google.com/p/oauth/source/detail?r=888

Original comment by morten.f...@gmail.com on 5 Feb 2009 at 10:19