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 for the #786 #812

Closed
wants to merge 6 commits into from
Closed

Fix for the #786 #812

wants to merge 6 commits into from

Conversation

haouarihk
Copy link
Contributor

@haouarihk haouarihk commented Jun 10, 2023

FIxed the issue with decode #786

@haouarihk
Copy link
Contributor Author

i hate macos 16 for this

@haouarihk
Copy link
Contributor Author

i just corrected a little mistake @hikarunoryoma 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).toString() which is telling the buffer object to take that base64 and tell it it's a type of base64, and then stringify that buffer

.nyc_output

# ignore history
.history
Copy link
Member

Choose a reason for hiding this comment

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

These changes in .gitignore are OK, but can you create a separate PR for them? I prefer to have self-contained PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i see sorry

Copy link
Member

Choose a reason for hiding this comment

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

No problem, thank you for working on the PR!

BTW, you don't need to close and create a new one, you can also just update an existing PR.


if (publicKey.length !== 65) {
throw new Error('Vapid public key should be 65 bytes long when decoded.');
throw new Error(`Vapid public key should be 65 bytes long when decoded. got (${publicKey.length}) ${publicKey}`);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new Error(`Vapid public key should be 65 bytes long when decoded. got (${publicKey.length}) ${publicKey}`);
throw new Error(`Vapid public key should be 65 bytes long when decoded, got (${publicKey.length}) ${publicKey}`);

@haouarihk haouarihk closed this Jun 11, 2023
@haouarihk haouarihk deleted the patch-1 branch June 11, 2023 13:21
@hikarunoryoma
Copy link
Contributor

Thanks for addressing here!

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

3 participants