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

Base64 decode fix #813

Merged
merged 6 commits into from
Jun 11, 2023
Merged

Conversation

haouarihk
Copy link
Contributor

@haouarihk haouarihk commented Jun 11, 2023

FIxed the issue with decode #786

Explained

I just corrected a little mistake @hikarunoryoma have made with
Buffer.from he did buffer.from(base64).toString("base64") which essentially takes in the base64 as a utf-8 and tries to convert it into a string of type "base64"

but instead it should be
buffer.from(base64, "base64") which is telling the buffer object to take that base64 and tell it it's a type of base64

@marco-c
Copy link
Member

marco-c commented Jun 11, 2023

There are some test failures, strangely they were not present in your earlier PR. Maybe you changed something?

Copy link
Member

@marco-c marco-c left a comment

Choose a reason for hiding this comment

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

Thanks!

@marco-c marco-c linked an issue Jun 11, 2023 that may be closed by this pull request
4 tasks
@marco-c marco-c merged commit de2aa16 into web-push-libs:master Jun 11, 2023
18 checks passed
@haouarihk haouarihk deleted the base64-decode-fix branch June 12, 2023 02:09
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.

Underlying dependency urlsafe-base64 uses Buffer unsafely
3 participants