Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Return friendly error if input is Base64 encoded #630

Open
lavaleri opened this issue Jun 14, 2021 · 1 comment
Open

Return friendly error if input is Base64 encoded #630

lavaleri opened this issue Jun 14, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@lavaleri
Copy link
Contributor

Problem:

We have some code that intends to return a friendly error if the first byte is base64 encoded:

However we can't ever get inside those statements because we first do a check at:

needs(deserializer, 'Not a supported message format version.')

Solution:

Move the logic checking the expected first byte in Base64 before the branch that determines which version we're deserializing.

Out of scope:

n/a

@lavaleri lavaleri added the bug Something isn't working label Jun 14, 2021
@gauthaman92
Copy link

Could you please share the updated logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants