# HG changeset patch # User Igor Sysoev # Date 1198764934 0 # Node ID adca43955f79ac1702773870d8f2fba8eff5420a # Parent 0673b54f34f7bd5ea427682e9e62665f312deab4 return NGX_DECLINED if access directives are not active, this fixes case when satisfy any does not test active directives at all diff -r 0673b54f34f7 -r adca43955f79 src/http/modules/ngx_http_access_module.c --- a/src/http/modules/ngx_http_access_module.c Thu Dec 27 13:15:43 2007 +0000 +++ b/src/http/modules/ngx_http_access_module.c Thu Dec 27 14:15:34 2007 +0000 @@ -98,7 +98,7 @@ alcf = ngx_http_get_module_loc_conf(r, ngx_http_access_module); if (alcf->rules == NULL) { - return NGX_OK; + return NGX_DECLINED; } /* AF_INET only */ @@ -128,7 +128,7 @@ } } - return NGX_OK; + return NGX_DECLINED; } diff -r 0673b54f34f7 -r adca43955f79 src/http/modules/ngx_http_auth_basic_module.c --- a/src/http/modules/ngx_http_auth_basic_module.c Thu Dec 27 13:15:43 2007 +0000 +++ b/src/http/modules/ngx_http_auth_basic_module.c Thu Dec 27 14:15:34 2007 +0000 @@ -113,7 +113,7 @@ alcf = ngx_http_get_module_loc_conf(r, ngx_http_auth_basic_module); 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);