Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Strip JWT base64 padding before parsing. #560 #561

Merged
merged 1 commit into from
Mar 25, 2018
Merged

Strip JWT base64 padding before parsing. #560 #561

merged 1 commit into from
Mar 25, 2018

Conversation

danopia
Copy link
Contributor

@danopia danopia commented Mar 9, 2018

This provider used to allow padding, until it was switched to the builtin RawURLEncoding. This PR fixes the regression by accepting padding again via throwing the padding away.

Google doesn't include padding, but other OAuth2 servers may, and this provider is the default when using a custom provider.

@ploxiln
Copy link
Contributor

ploxiln commented Mar 9, 2018

I think #421 was a mistake - we did not intend to stop supporting padding. It should probably just be reverted. cc @talam

@talam
Copy link
Contributor

talam commented Mar 9, 2018

Sorry, that's a mistake on my part. cc @jehiah who can take a look as I am not a maintainer anymore.

If we don't end up reverting the commit, it would be good to include a test case for this as well in google_test.go

@ploxiln
Copy link
Contributor

ploxiln commented Mar 9, 2018

... now that I look closer, this is sort of equivalent reverting #421, but a bit simpler IMHO, so I change my mind and think we should merge this :)

@jehiah jehiah merged commit 1c1db88 into bitly:master Mar 25, 2018
@danopia danopia deleted the patch-1 branch July 24, 2018 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants