return NGX_DECLINED if access directives are not active,

this fixes case when satisfy any does not test active directives at all
This commit is contained in:
Igor Sysoev 2007-12-27 14:15:34 +00:00
parent 11fbf47374
commit fe8a327eff
2 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,7 @@ ngx_http_access_handler(ngx_http_request_t *r)
alcf = ngx_http_get_module_loc_conf(r, ngx_http_access_module); alcf = ngx_http_get_module_loc_conf(r, ngx_http_access_module);
if (alcf->rules == NULL) { if (alcf->rules == NULL) {
return NGX_OK; return NGX_DECLINED;
} }
/* AF_INET only */ /* AF_INET only */
@ -128,7 +128,7 @@ ngx_http_access_handler(ngx_http_request_t *r)
} }
} }
return NGX_OK; return NGX_DECLINED;
} }

View File

@ -113,7 +113,7 @@ ngx_http_auth_basic_handler(ngx_http_request_t *r)
alcf = ngx_http_get_module_loc_conf(r, ngx_http_auth_basic_module); alcf = ngx_http_get_module_loc_conf(r, ngx_http_auth_basic_module);
if (alcf->realm.len == 0 || alcf->user_file.len == 0) { if (alcf->realm.len == 0 || alcf->user_file.len == 0) {
return NGX_OK; return NGX_DECLINED;
} }
ctx = ngx_http_get_module_ctx(r, ngx_http_auth_basic_module); ctx = ngx_http_get_module_ctx(r, ngx_http_auth_basic_module);