Skip to content

[Notifier] [OvhCloud] “Invalid signature” for message with slashes #39836

@OneT0uch

Description

@OneT0uch

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;

Additional context
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy