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

[Question] The error message and the conditional expression do not seem to match? #5

Open
gatchan0807 opened this issue Dec 10, 2021 · 0 comments

Comments

@gatchan0807
Copy link

About

I think the condition of this code as written is the opposite.

if (signatureHash === hmac.hex()) {
    throw new Error(`${verifyErrorPrefix}: signature mismatch`)
}

If I'm wrong about any part of this, I'd like to know about it 🙇

Detail

I'm currently using this Bolt library to create a Slack Bot.
I have a question about this message that I sometimes receive during the development process.

[WARN]   Request verification failed: Failed to verify authenticity: signature mismatch

When I checked where this error message was being output, I noticed that the conditional expression was the opposite.

if (signatureHash === hmac.hex()) {

I checked the relevant part of the library for Node.js and the flow described in the documentation, but it looked different from here.

If this is intentional and caused by me missing something, please don't worry about it.
If not, please respond and provide a new version. I would appreciate it if you could respond.

Thanks.

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

No branches or pull requests

1 participant