]> git.kaiwu.me - nginx.git/commitdiff
return NGX_DECLINED if access directives are not active,
authorIgor Sysoev <igor@sysoev.ru>
Thu, 27 Dec 2007 14:15:34 +0000 (14:15 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 27 Dec 2007 14:15:34 +0000 (14:15 +0000)
this fixes case when satisfy any does not test active directives at all

src/http/modules/ngx_http_access_module.c
src/http/modules/ngx_http_auth_basic_module.c

index e4e87b24317c2383624f8edfb89855eabf951110..44a2fbd89574775b0d415f6f8d2cf2b52708e3dc 100644 (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);
 
     if (alcf->rules == NULL) {
-        return NGX_OK;
+        return NGX_DECLINED;
     }
 
     /* AF_INET only */
@@ -128,7 +128,7 @@ ngx_http_access_handler(ngx_http_request_t *r)
         }
     }
 
-    return NGX_OK;
+    return NGX_DECLINED;
 }
 
 
index 72b4bbdcb276c5a580cc066f7332b17a94aed67c..41e53cd948c405df835d584bc6caa301346fd9ab 100644 (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);
 
     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);