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

Strip base64 padding in protocol.URLEncodedBase64 #93

Closed
Southclaws opened this issue Jan 14, 2023 · 1 comment · Fixed by #95
Closed

Strip base64 padding in protocol.URLEncodedBase64 #93

Southclaws opened this issue Jan 14, 2023 · 1 comment · Fixed by #95
Labels
status/needs-triage Issues that need to be triaged. type/feature-request Feature Requests

Comments

@Southclaws
Copy link

Description

(version: github.com/go-webauthn/webauthn v0.5.0)

It seems the type protocol.URLEncodedBase64 is, correctly, decoding base64 without padding. (ref) however, a frontend tool I'm using to implement webauthn seems to be adding padding to the publicKey.response.userHandle.

Now I can strip this out myself, but would it be incorrect for this library to conveniently strip padding automatically given that it's not meant to be there anyway?

Use Case

No response

Documentation

No response

@james-d-elliott
Copy link
Member

I'm a bit on the fence on this. Potentially this is something we can do. I will look at direction from the spec if I get time during the week.

james-d-elliott added a commit that referenced this issue Jan 28, 2023
This adds support to ignore the trailing padding of base64 URL encoded bytes.

Closes #93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/needs-triage Issues that need to be triaged. type/feature-request Feature Requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants