]> code.citadel.org Git - citadel.git/blobdiff - citadel/ldap.c
Began removing $Id$ tags. This will be an ongoing process.
[citadel.git] / citadel / ldap.c
index 2e293276e3734a54b22b0b5b291b47255ca80e29..75bbb976a5fe17d85021700c76ddb190afff23ea 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * These functions implement the portions of AUTHMODE_LDAP and AUTHMODE_LDAP_AD which
  * actually speak to the LDAP server.
  *
@@ -228,6 +226,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) {