Description
Symfony version(s) affected: 5.3.4
Symfony/firebase-notifier version(s) affected: 5.3.4
Description
Insufficient error handling in doSend() method in vendor/symfony/firebase-notifier/FirebaseTransport.php
How to reproduce
Send a firebase request with an timed out token
Possible Solution
Correct error verification to catch errors, also take return values failure/success into account
Additional context
The error catching part:
if ($jsonContents && isset($jsonContents['results']['error'])) { throw new TransportException('Unable to post the Firebase message: '.$jsonContents['error'], $response); }
Does not catch errors returned by firebase:
array:5 [ "multicast_id" => 0101010101010101010 "success" => 0 "failure" => 1 "canonical_ids" => 0 "results" => array:1 [ 0 => array:1 [ "error" => "NotRegistered" ] ] ]