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

A buffer looks like an object in js #97

Merged
merged 2 commits into from
Apr 24, 2022
Merged

Conversation

arj03
Copy link
Member

@arj03 arj03 commented Apr 23, 2022

You can't current use verify if the signature is a buffer. This fixes that problem :)

@arj03 arj03 requested a review from staltz April 23, 2022 17:12
@davegomez
Copy link
Contributor

If the signature is a base 64 string, is the isObject the right validation here?

@arj03
Copy link
Member Author

arj03 commented Apr 24, 2022

@davegomez the idea is that if you are passing in an object instead of a string, you should rather use verifyObj. This function works with both string and buffer. It's just that in javascript typeof (buffer) == 'object' ;-)

Copy link
Member

@staltz staltz left a comment

Choose a reason for hiding this comment

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

@arj03 A little test would be nice, but obviously this is mergeable because it just improves the codebase.

@arj03 arj03 merged commit ba0e420 into main Apr 24, 2022
@arj03 arj03 deleted the fix-object-check-in-verify branch April 24, 2022 19:02
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