X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fldap.c;h=19625454605246c51bd8fb85cf2f7e1e1cd7ede2;hb=e1ac2a8edcd0d74d44cebc3136bb58379d4f440e;hp=2e293276e3734a54b22b0b5b291b47255ca80e29;hpb=ab72716e077f29a75ce0be64f84a910de565e5ba;p=citadel.git diff --git a/citadel/ldap.c b/citadel/ldap.c index 2e293276e..196254546 100644 --- a/citadel/ldap.c +++ b/citadel/ldap.c @@ -228,6 +228,11 @@ int CtdlTryPasswordLDAP(char *user_dn, const char *password) LDAP *ldserver = NULL; int i = (-1); + if (IsEmptyStr(password)) { + CtdlLogPrintf(CTDL_DEBUG, "LDAP: empty passwords are not permitted\n"); + return(1); + } + CtdlLogPrintf(CTDL_DEBUG, "LDAP: trying to bind as %s\n", user_dn); ldserver = ldap_init(config.c_ldap_host, config.c_ldap_port); if (ldserver) {