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

Reliable payload signature verification #76

Closed
gimenete opened this issue Apr 24, 2019 · 1 comment
Closed

Reliable payload signature verification #76

gimenete opened this issue Apr 24, 2019 · 1 comment
Labels
Type: Feature New feature or request
Projects

Comments

@gimenete
Copy link
Contributor

We had issues verifying the signature of some payloads here #71 due to the way it is being calculated (JSON.parse + JSON.stringify) and I made a quick and dirty suggestion #71 (comment)

Nevertheless, the long term solution should be to always calculate the signature from the raw, original, payload.

I know that there are some circumstances where that's not possible (e.g. seems like Firebase doesn't expose the raw original body) but the library should always use the raw payload whenever possible and warn the developer if it's not possible.

We haven't seen any new mismatch between the way webhooks.js calculates the signature, but it could happen since the implementation assumes things that shouldn't rely on.

@gr2m gr2m added the Type: Feature New feature or request label May 5, 2020
@gr2m gr2m added this to Features in JS May 5, 2020
@gr2m
Copy link
Contributor

gr2m commented Jun 17, 2021

you can now pass the raw request body string to verifyAndReceive, via #420

@gr2m gr2m closed this as completed Jun 17, 2021
JS automation moved this from Features to Done Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
No open projects
JS
  
Done
Development

No branches or pull requests

2 participants