提交 919001c8 编写于 作者: D Daniel Beck

[SECURITY-241] Add explanation for chosen implementation

上级 def5bdb1
......@@ -112,6 +112,7 @@ public class ApiTokenProperty extends UserProperty {
public boolean matchesPassword(String password) {
String token = getApiTokenInsecure();
// String.equals isn't constant time, but this is
return MessageDigest.isEqual(password.getBytes(Charset.forName("US-ASCII")),
token.getBytes(Charset.forName("US-ASCII")));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册