Skip to content

fix: webhook verification using a constant-time comparison#2

Merged
gr2m merged 4 commits intogr2m:mainfrom
AlCalzone:update-docs
Sep 6, 2022
Merged

fix: webhook verification using a constant-time comparison#2
gr2m merged 4 commits intogr2m:mainfrom
AlCalzone:update-docs

Conversation

@AlCalzone
Copy link
Contributor

@AlCalzone AlCalzone commented Aug 31, 2022

I've found that splitting the private key into 3 parts is no longer necessary.

Also the wrangler CLI is now available under the wrangler package, and the deploy action has a new version. Both simplify the wrangler.toml a bit.

I've also taken the liberty to convert the worker.js to the new module workers format.

Also, this implements webhook verification using a constant-time comparison
fixes: #1

@AlCalzone AlCalzone marked this pull request as draft August 31, 2022 12:34
@AlCalzone AlCalzone marked this pull request as ready for review August 31, 2022 12:36
@AlCalzone AlCalzone marked this pull request as draft August 31, 2022 12:38
@AlCalzone AlCalzone changed the title Update documentation Update documentation and implement webhook verification Aug 31, 2022
@AlCalzone AlCalzone marked this pull request as ready for review August 31, 2022 12:44
Copy link
Owner

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

This is great, thank you so much!

@gr2m gr2m changed the title Update documentation and implement webhook verification fix: webhook verification using a constant-time comparison Sep 6, 2022
@gr2m gr2m merged commit dee1c77 into gr2m:main Sep 6, 2022
@github-actions
Copy link

github-actions bot commented Sep 6, 2022

🎉 This PR is included in version 1.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@AlCalzone AlCalzone deleted the update-docs branch September 6, 2022 20:36
@gr2m
Copy link
Owner

gr2m commented Sep 6, 2022

Any guidance on how to resolve this deploy error?

image

@AlCalzone
Copy link
Contributor Author

oh yeah, just do what the error says. Add

compatibility_date = "<today in yyyy-mm-dd>"

to wrangler.toml like here

@AlCalzone
Copy link
Contributor Author

This just enables all possibly breaking changes before that date that are listed on https://developers.cloudflare.com/workers/platform/compatibility-dates/.

@gr2m
Copy link
Owner

gr2m commented Sep 6, 2022

LOoks like we are back in business, thank you!

The node_compat = true config is a temporary workaround until we complete ESM transition and we get conditional exports: https://github.com/gr2m/cloudflare-worker-github-app-example/runs/8218002793?check_suite_focus=true#step:6:18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement signature verification

2 participants