Fix authentication for user/group validations

This fixes issue #40.  User passwords should *always* be checked during authentication (except when a user fails to satisfy given requirements).  Previously, the PHASE_CHECK_BIND step of authentication would not check passwords in any LDAP configuration where ``require valid_user`` was not specified (eg using ``require user`` or ``require group``).
main
David Beitey 11 years ago
parent 93cd9f094a
commit 0cc183bedd
  1. 5
      ngx_http_auth_ldap_module.c

@ -1708,11 +1708,6 @@ ngx_http_auth_ldap_authenticate(ngx_http_request_t *r, ngx_http_auth_ldap_ctx_t
} }
} }
if (ctx->server->require_valid_user == 0) {
ctx->phase = PHASE_NEXT;
break;
}
/* Initiate bind using the found DN and request password */ /* Initiate bind using the found DN and request password */
rc = ngx_http_auth_ldap_check_bind(r, ctx); rc = ngx_http_auth_ldap_check_bind(r, ctx);
if (rc == NGX_AGAIN) { if (rc == NGX_AGAIN) {

Loading…
Cancel
Save