Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: catch type error when decoding base64url signature #569

Merged
merged 4 commits into from
Sep 1, 2023

Conversation

lboynton
Copy link
Contributor

@lboynton lboynton commented Sep 1, 2023

When encountering a signature that cannot be decoded as base64, a type error is thrown. Ideally this should be caught and rethrown as a JOSEError so that error handling logic only needs to handle JOSEErrors.

src/jws/flattened/verify.ts Outdated Show resolved Hide resolved
lboynton and others added 2 commits September 1, 2023 14:10
Co-authored-by: Filip Skokan <panva.ip@gmail.com>
@panva panva changed the title Catch type error when decoding base64 signature refactor: catch type error when decoding base64url signature Sep 1, 2023
@panva panva merged commit 935e920 into panva:main Sep 1, 2023
22 checks passed
@lboynton
Copy link
Contributor Author

lboynton commented Sep 1, 2023

Thanks! 🚀

@panva
Copy link
Owner

panva commented Sep 1, 2023

Thank you @lboynton

@lboynton lboynton deleted the patch-2 branch September 4, 2023 10:10
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants