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 + bug #2

Merged
merged 1 commit into from
Nov 9, 2022
Merged

fix + bug #2

merged 1 commit into from
Nov 9, 2022

Conversation

JHthe4
Copy link
Contributor

@JHthe4 JHthe4 commented Oct 3, 2022

The URL does not contain a Base64-URL enoded string, so URLLib will parse it wrong ("+" is parsed into " "). This quick and dirty patch fixes that.

@ss23
Copy link
Owner

ss23 commented Oct 3, 2022

Thanks for the bug fix! Do you think that using https://docs.python.org/3/library/base64.html#base64.urlsafe_b64decode instead would be a better fix, @JHthe4? I think that'll solve other characters that aren't right, too.

@JHthe4
Copy link
Contributor Author

JHthe4 commented Oct 3, 2022

You would think so, but unfortunately the URL in the QR code isn't even encoded correctly (at least it wasn't in my case). It contained both / and + characters, but the / was parsed correctly. So the alternative would be to do two replacements earlier, and then parse the string with the function you specified. In my opinion, this would be more hacky than just fixing the one problem with the + sign. It's up to you though, both ways are a relatively simple fix.

@ss23 ss23 merged commit d2d1e92 into ss23:master Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants