Skip to content

Commit

Permalink
[AD-70] on authenticate do not support blank password (#3)
Browse files Browse the repository at this point in the history
* [AD-70] on authenticate do not support blank password
  • Loading branch information
andrea-patricelli authored Apr 6, 2022
1 parent a1d2357 commit 29ca317
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target
.idea
3 changes: 3 additions & 0 deletions src/main/java/net/tirasa/connid/bundles/ad/ADConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ private Pair<AuthenticationResult, LdapContext> createContext(

@Override
public void access(char[] clearChars) {
if(clearChars == null || clearChars.length == 0){
throw new IllegalArgumentException("Password is blank");
}
env.put(Context.SECURITY_CREDENTIALS, new String(clearChars));
}
});
Expand Down

0 comments on commit 29ca317

Please sign in to comment.