fix: Throw exception on invalid base64#576
Conversation
Fixed JWT::urlsafeB64Decode not actually throwing an InvalidArgumentException on invalid base64 characters, despite doc comment saying that it does.
|
It looks like it currently throws an As this would be a breaking change, wouldn't it be better to just reflect the doc comment to match what's happening, rather than alter the existing behavior? |
|
The current behavior of In regards to the changing I do in I would had had |
Last change still allowed input that was invalid base64URL but valid base64
|
I have added tests to demonstrate the error I described However, while working on that I realized that my solution would still allow invalid base64URL through, as long as it is valid base64. I have also fixed that now. |
Fixed JWT::urlsafeB64Decode not actually throwing an InvalidArgumentException on invalid base64 characters, despite doc comment saying that it does.