Skip to content

Commit 431b3dc

Browse files
mukul1987jtuglu1cecemei
authored
Add length checks to LDAPCredentialsValidator (#18959) (#18997) (#438)
(cherry picked from commit a57afa1) Co-authored-by: jtuglu1 <jtuglu@netflix.com> Co-authored-by: Cece Mei <yingqian.mei@gmail.com>
1 parent 63d72b0 commit 431b3dc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authentication/validator/LDAPCredentialsValidator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ public AuthenticationResult validateCredentials(
153153
char[] password
154154
)
155155
{
156+
if (username.isEmpty() || password.length == 0) {
157+
return null;
158+
}
156159
final SearchResult userResult;
157160
final LdapName userDn;
158161
final Map<String, Object> contextMap = new HashMap<>();

0 commit comments

Comments
 (0)