You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Summary:
When attempting to decode a JSON Web Signature (JWS) using the load method from JWSProviderInterface, the decoding process fails if the JWS payload is empty. This behavior is unexpected and leads to issues in scenarios where an empty payload is a valid use case.
Steps to Reproduce:
Utilize the provided code snippet with a JWS having an empty payload.
Observe that the decoding process fails, and the payload remains empty.
Expected Behavior:
The load method should successfully decode the JWS, even when the payload is empty. The resulting $jws variable should contain the decoded information.
public function index(JWSProviderInterface $JWSProvider): Response
{
try {
$jws = $JWSProvider->load('eyJraWQiOiJhdXRlbnRpLXByb2R1Y3Rpb24tMjAyMTAxMDEiLCJhbGciOiJSUzI1NiJ9..pD458pAX7r4xTfhuoU-jpFAV7mswnWvFGCIwjHt_AK5VsFfmaHi-iz682BD0CzuEW88ENGg4__Q_ZN_91okH499PXIWXch98t0MZcjAEjlyrkVLahZJIRHb-MdflJwVW9iQHpPSYeW3X2u6jVJE9lHJJA6TsQUuDvkgDAd1_BKTcFJKjvgAt-EnFbgwccEjdn2XVefer7bS6aYHb2U8t0P-ySAi0qBkFf8iE_63YkHsQogneJrYaC5NocPTUYHdXodAfYiu6nKOTHqyLxu5gQirSLHJaVxGj2bD3MT10HyYF1sT6ZRg9zFPKIIQIiZu_qN8ZwHQXkuAxRSclRjNr-g');
} catch (\Exception $e) {
dd($e->getMessage());
}
}
"Error while decoding from JSON"
The text was updated successfully, but these errors were encountered:
Bug Summary:
When attempting to decode a JSON Web Signature (JWS) using the load method from JWSProviderInterface, the decoding process fails if the JWS payload is empty. This behavior is unexpected and leads to issues in scenarios where an empty payload is a valid use case.
Steps to Reproduce:
Utilize the provided code snippet with a JWS having an empty payload.
Observe that the decoding process fails, and the payload remains empty.
Expected Behavior:
The load method should successfully decode the JWS, even when the payload is empty. The resulting $jws variable should contain the decoded information.
"Error while decoding from JSON"
The text was updated successfully, but these errors were encountered: