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

fix base64 encoding bug #18

Merged
merged 1 commit into from Feb 8, 2017
Merged

fix base64 encoding bug #18

merged 1 commit into from Feb 8, 2017

Conversation

tanner0101
Copy link
Member

I was having an issue where the following JWT token was resulting in a JWTError.decoding

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiNzk0RkRFQ0EtNUNGNi00NzI3LThFOEMtQTY4MEM0NTE1OTlEIiwibmFtZSI6IlZhcG9yIFRlc3QifX0=.LjE98FgjMOfoWYoQp+kKTsOMhHO3mhgmSJ+E9uF1lxF6Iboe58s\/Ojt20bXNIFj7+y6krBwp+l0txGoIViJrTw==

I think somewhere in here lies a \0 or some other unknown base64 character. Not quite sure what's causing these to get encoded into the base64--maybe that's an issue with how we're encoding base64 and this should be fixed there.

Either way, Core ignores invalid base64 characters when parsing. With that added, this token is working perfectly now.

@tanner0101 tanner0101 added the bug Something isn't working label Feb 8, 2017
@tanner0101 tanner0101 added this to the 0.7 milestone Feb 8, 2017
@tanner0101 tanner0101 self-assigned this Feb 8, 2017
@vzsg
Copy link
Member

vzsg commented Feb 8, 2017

Just out of curiosity, after ignoring the unknown character(s), can you actually verify the token signature?

@tanner0101
Copy link
Member Author

@vzsg yup, the signature verification passes.

Copy link
Member

@siemensikkema siemensikkema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! 👍

@tanner0101 tanner0101 merged commit 537c977 into master Feb 8, 2017
@tanner0101 tanner0101 deleted the base64-fix branch February 8, 2017 16:03
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

Successfully merging this pull request may close these issues.

None yet

3 participants