-
Notifications
You must be signed in to change notification settings - Fork 1k
Add option to skip signature verification #821
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
base: master
Are you sure you want to change the base?
Add option to skip signature verification #821
Conversation
e9cc8d8
to
ddbbd44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you address comments written in line/line-bot-sdk-go#595 (review) in this repository?
39d9b47
to
9f0b4f0
Compare
# or with skip_signature_verification | ||
parser = linebot.v3.WebhookParser( | ||
'YOUR_CHANNEL_SECRET', | ||
skip_signature_verification=lambda: True # or a function that returns a boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line/line-bot-sdk-go#595 (comment)
Therefor I think False
should be used in example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes
Motivation
The signature returned with webhooks is calculated using a single channel secret. If the bot owner changes their channel secret, the signature for webhooks starts being calculated using the new channel secret. To avoid signature verification failures, the bot owner must update the channel secret on their server, which is used for signature verification. However, if there is a timing mismatch in the update—and such a mismatch is almost unavoidable—verification will fail during that period.
In such cases, having an option to skip signature verification for webhooks would be a convenient way to avoid these issues.
Related PRs