You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2010/07/24 01:53:58 UTC
svn commit: r967310 - /shindig/trunk/php/src/gadgets/SigningFetcher.php
Author: lindner
Date: Fri Jul 23 23:53:57 2010
New Revision: 967310
URL: http://svn.apache.org/viewvc?rev=967310&view=rev
Log:
SHIDNIG-1394 | Patch from Bastian Hofmann | Gadget SigningFetcher creates invalid oauth_signature
Modified:
shindig/trunk/php/src/gadgets/SigningFetcher.php
Modified: shindig/trunk/php/src/gadgets/SigningFetcher.php
URL: http://svn.apache.org/viewvc/shindig/trunk/php/src/gadgets/SigningFetcher.php?rev=967310&r1=967309&r2=967310&view=diff
==============================================================================
--- shindig/trunk/php/src/gadgets/SigningFetcher.php (original)
+++ shindig/trunk/php/src/gadgets/SigningFetcher.php Fri Jul 23 23:53:57 2010
@@ -136,17 +136,18 @@ class SigningFetcher extends RemoteConte
$postData = implode("&", $postData);
}
}
- $newQuery = '';
+ $newQueryParts = array();
foreach ($req_req->get_parameters() as $key => $param) {
if (! isset($forPost[$key])) {
if (!is_array($param)) {
- $newQuery .= urlencode($key) . '=' . urlencode($param) . '&';
+ $newQueryParts[] = urlencode($key) . '=' . urlencode($param);
} else {
foreach($param as $elem) {
- $newQuery .= urlencode($key) . '=' . urlencode($elem) . '&';
+ $newQueryParts[] = urlencode($key) . '=' . urlencode($elem);
}
}
}
+> $newQuery = implode('&', $newQueryParts);
}
// Careful here; the OAuth form encoding scheme is slightly different than
// the normal form encoding scheme, so we have to use the OAuth library