The Unified and Autonomous Development Platform
Prevent empty password from ldap authenticator
Robin Shen2c3a13abd89a
diff --git a/server-core/src/main/java/io/onedev/server/model/support/administration/authenticator/ldap/LdapAuthenticator.java b/server-core/src/main/java/io/onedev/server/model/support/administration/authenticator/ldap/LdapAuthenticator.javaindex 193abde0f1..1b41c14df8 100644--- a/server-core/src/main/java/io/onedev/server/model/support/administration/authenticator/ldap/LdapAuthenticator.java+++ b/server-core/src/main/java/io/onedev/server/model/support/administration/authenticator/ldap/LdapAuthenticator.java@@ -334,7 +334,7 @@ public class LdapAuthenticator extends Authenticator {"'follow referrals' to true to avoid this exception.", pre);}}- if (email == null)+ if (StringUtils.isBlank(email))throw new AccountException("Email is required but not available in ldap directory");elsereturn new Authenticated(email, fullName, groupNames);