Closed
Description
Symfony version(s) affected: 5.1.
Description
"Invalid signature error" when i try to send a sms with ovh cloud which contain an url.
How to reproduce
$message = "https://symfony.com/doc/current/index.html"
$notification = (new Notification($message))
->content('foo')
->importance(Notification::IMPORTANCE_HIGH);
$recipient = new AdminRecipient('insert email', 'insert phonenumber');
$this->notifier->send($notification, $recipient);
Possible Solution
The json used as a signature is different from the json send by HTTPClient, resulting in an invalid signature
OvhCloudTransport.php (Line 79)
Remove \JSON_UNESCAPED_SLASHES
$toSign = $this->applicationSecret.'+'.$this->consumerKey.'+POST+'.$endpoint.'+'.json_encode($content, \JSON_UNESCAPED_SLASHES).'+'.$now;
to
$toSign = $this->applicationSecret.'+'.$this->consumerKey.'+POST+'.$endpoint.'+'.json_encode($content).'+'.$now;