-
Notifications
You must be signed in to change notification settings - Fork 113
Fix signature with escaping characters #379
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
Conversation
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.
see comments
@@ -195,7 +195,7 @@ public boolean verifyNotificationSignature(String body, String timestamp, String | |||
* @return whether response signature is valid or not | |||
*/ | |||
public boolean verifyApiResponseSignature(String publicId, String version, String signature) { | |||
return new ApiResponseSignatureVerifier(config.apiSecret, config.signatureAlgorithm).verifySignature(publicId, version, signature); | |||
return new ApiResponseSignatureVerifier(config.apiSecret, config.signatureAlgorithm).verifySignature(publicId, version, signature, config.signatureVersion); |
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.
it should always use version 1, hardcoded.
@@ -57,9 +57,9 @@ public ApiResponseSignatureVerifier(String secretKey, SignatureAlgorithm signatu | |||
* | |||
* @return true if response signature passed verification procedure | |||
*/ | |||
public boolean verifySignature(String publicId, String version, String signature) { | |||
public boolean verifySignature(String publicId, String version, String signature, int signatureVersion) { |
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.
and here too, version 1 hardcoded
Brief Summary of Changes
Fix signature with escaping characters
What does this PR address?
Are tests included?
Reviewer, please note:
Checklist: