1
0
mirror of https://github.com/ovh/php-ovh.git synced 2023-11-05 03:20:26 +01:00

Fix invalid signature when url has url-encoded characters

This commit is contained in:
Olivier Mouren 2018-05-25 11:11:30 +02:00
parent 69f2347e2e
commit 490129ef73

View File

@ -295,7 +295,7 @@ class Api
if (isset($this->consumer_key)) { if (isset($this->consumer_key)) {
$toSign = $this->application_secret . '+' . $this->consumer_key . '+' . $method $toSign = $this->application_secret . '+' . $this->consumer_key . '+' . $method
. '+' . $url . '+' . $body . '+' . $now; . '+' . (string) $request->getUri() . '+' . $body . '+' . $now;
$signature = '$1$' . sha1($toSign); $signature = '$1$' . sha1($toSign);
$headers['X-Ovh-Consumer'] = $this->consumer_key; $headers['X-Ovh-Consumer'] = $this->consumer_key;
$headers['X-Ovh-Signature'] = $signature; $headers['X-Ovh-Signature'] = $signature;