projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab72716
)
* LDAP auth - do not permit empty passwords
author
Art Cancro
<ajc@citadel.org>
Tue, 22 Jun 2010 21:12:21 +0000
(21:12 +0000)
committer
Art Cancro
<ajc@citadel.org>
Tue, 22 Jun 2010 21:12:21 +0000
(21:12 +0000)
citadel/ldap.c
patch
|
blob
|
history
diff --git
a/citadel/ldap.c
b/citadel/ldap.c
index 2e293276e3734a54b22b0b5b291b47255ca80e29..19625454605246c51bd8fb85cf2f7e1e1cd7ede2 100644
(file)
--- 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);
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) {
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) {