-
Notifications
You must be signed in to change notification settings - Fork 139
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
hmac key and signature parameter names flipped? #1214
Comments
Hi @therealppa, Thanks for reaching out here. Actually yes we did have this issue of flipped parameters on this method! We fixed it in a the latest versions though, apologies for the confusion that might have caused you :) Best, Jilling |
Thanks for the quick answer. In which version is it fixed? Looking at 22.1.0: In line 78, note that it calls calculateHMAC with signature as the second parameter while that method (line 43) expects a key there. |
Ah my bad, we have not merged this yet as technically this is a breaking change. Hence we will hold of for a bit until we're ready to do another major release. You can follow the fix in this pr #1185. |
All clear now, thanks :) |
Describe the bug
Referring to this method at
adyen-java-api-library/src/main/java/com/adyen/util/HMACValidator.java
Line 77 in 1768c6d
Is it possible that the key and signature params are flipped? My understanding is that the signature is the string that gets sent in the request header, and the key is the string that gets generated during webhook configuration. So the expected signature is calculated based on the key and the merchantSignature is the one that was sent in the request?
The text was updated successfully, but these errors were encountered: