bugfix: User gets authenticated when satisfy is 'any' and no group

matches.
This commit is contained in:
Tomáš Golembiovský
2013-09-09 18:50:07 +02:00
parent ee45bc4898
commit 59ef5fd1df
+5
View File
@@ -1807,8 +1807,13 @@ ngx_http_auth_ldap_check_group(ngx_http_request_t *r, ngx_http_auth_ldap_ctx_t *
/* Check next group */ /* Check next group */
if (ctx->iteration >= ctx->server->require_group->nelts) { if (ctx->iteration >= ctx->server->require_group->nelts) {
/* No more groups */
if (ctx->server->satisfy_all == 0) {
return NGX_DECLINED;
} else {
return NGX_OK; return NGX_OK;
} }
}
if (!ngx_http_auth_ldap_get_connection(ctx)) { if (!ngx_http_auth_ldap_get_connection(ctx)) {
return NGX_AGAIN; return NGX_AGAIN;