mirror of
https://github.com/ovh/php-ovh.git
synced 2023-11-05 03:20:26 +01:00
Merge pull request #26 from Olinkl/AdrienBensaibi/fix_invalidsignature_by_querystring
Add content from QueryString into to build signature
This commit is contained in:
commit
43b0ba34e4
@ -232,7 +232,8 @@ class Api
|
|||||||
$query = array_merge($query, (array)$content);
|
$query = array_merge($query, (array)$content);
|
||||||
$query = \GuzzleHttp\Psr7\build_query($query);
|
$query = \GuzzleHttp\Psr7\build_query($query);
|
||||||
|
|
||||||
$request = $request->withUri($request->getUri()->withQuery($query));
|
$url = $request->getUri()->withQuery($query);
|
||||||
|
$request = $request->withUri($url);
|
||||||
$body = "";
|
$body = "";
|
||||||
} elseif (isset($content)) {
|
} elseif (isset($content)) {
|
||||||
$body = json_encode($content);
|
$body = json_encode($content);
|
||||||
|
@ -242,4 +242,12 @@ class ApiFunctionalTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$this->api->get('/me/accessRestriction/ip', ['foo' => 'bar']);
|
$this->api->get('/me/accessRestriction/ip', ['foo' => 'bar']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test Api::get, should build valide signature
|
||||||
|
*/
|
||||||
|
public function testApiGetWithQueryString()
|
||||||
|
{
|
||||||
|
$this->api->get('/me/api/credential', ['status' => 'pendingValidation']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user