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

AbstractCompareAuthenticationHandler uses the wrong format string when PasswordScheme contains a "-" character #121

binsys opened this Issue May 29, 2017 · 2 comments


None yet
3 participants
Copy link

binsys commented May 29, 2017

In class AbstractCompareAuthenticationHandler
passwordScheme = "SHA-256"
final MessageDigest md = MessageDigest.getInstance(passwordScheme);
This is correct.
String.format("{%s}%s", passwordScheme, LdapUtils.base64Encode(hash)).getBytes());
This is not considered when the passwordScheme contains the '-' character.


For example:

On LDAP Server,store userPassword (encode by SHA-256) format is:


dfish3r added a commit that referenced this issue May 31, 2017

Support both name and algorithm for compare scheme.
Continue to support string input for API compatability.
Refactor digesting into separate method.
Fixes #121

This comment has been minimized.

Copy link

serac commented May 31, 2017

Just tying to clarify the usage @binsys would need with the fix proposed in #122.

final CompareAuthenticationHandler handler = new CompareAuthenticationHandler();

Is that correct?


This comment has been minimized.

Copy link

dfish3r commented May 31, 2017

That's what I had in mind. No API breakage, but still no first class support for salted hashes.

@serac serac closed this in #122 May 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment