Skip to content

Commit

Permalink
Treat a zero-length password as a failure
Browse files Browse the repository at this point in the history
Some LDAP servers allow binding with blank passwords. We should
not allow a blank password to authenticate the SSSD.
  • Loading branch information
sgallagher committed Aug 24, 2010
1 parent 976e5c7 commit 6094a2e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/providers/ldap/ldap_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,13 @@ static struct tevent_req *auth_send(TALLOC_CTX *memctx,
req = tevent_req_create(memctx, &state, struct auth_state);
if (!req) return NULL;

/* Treat a zero-length password as a failure */
if (password.length == 0) {
state->result = SDAP_AUTH_FAILED;
tevent_req_done(req);
return tevent_req_post(req, ev);
}

state->ev = ev;
state->ctx = ctx;
state->username = username;
Expand Down

0 comments on commit 6094a2e

Please sign in to comment.