Skip to content

Commit

Permalink
Incoming HMAC header in error message #139
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Oct 21, 2019
1 parent 6c4909a commit 8f491b5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

Expand All @@ -24,7 +25,7 @@ public static void hmacVerify(
final String calculateHmac = getCalculatedHmac(postContent, hmacSecret, algorithm);
if (!headerValue.equalsIgnoreCase(calculateHmac)) {
throw new WhitelistException(
"HMAC verification failed with \"" + hmacHeader + "\" and algorithm " + algorithm);
"HMAC verification failed with \"" + hmacHeader + "\" as \""+headerValue+"\" and algorithm " + algorithm);
}
}

Expand Down

0 comments on commit 8f491b5

Please sign in to comment.