Skip to content

Commit

Permalink
[FIX SECURITY-245] Compare crumbs in constant time
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Jan 26, 2016
1 parent 536c01b commit 559566b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -95,7 +95,7 @@ public boolean validateCrumb(ServletRequest request, String salt, String crumb)
if (request instanceof HttpServletRequest) {
String newCrumb = issueCrumb(request, salt);
if ((newCrumb != null) && (crumb != null)) {
return newCrumb.equals(crumb);
return MessageDigest.isEqual(newCrumb.getBytes(), crumb.getBytes());
}
}
return false;
Expand Down

0 comments on commit 559566b

Please sign in to comment.