summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Filimonov <fffilimonov@yandex.ru>2018-02-26 16:52:20 +0200
committerVadim Filimonov <fffilimonov@yandex.ru>2018-02-26 16:52:20 +0200
commitf607032e0c7edd44b25a759ebcaea077e94f6b10 (patch)
tree3590c44982ad4af48ad74cd0e3fa01c41087a968
parentdd7dba520c20eb81576cfa5afd4570c50e83c990 (diff)
downloadnginx-f607032e0c7edd44b25a759ebcaea077e94f6b10.tar.gz
Auth basic: prevent null character in error log (ticket #1494).
-rw-r--r--src/http/modules/ngx_http_auth_basic_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c
index 2f345b6d5..a6f9ec46c 100644
--- a/src/http/modules/ngx_http_auth_basic_module.c
+++ b/src/http/modules/ngx_http_auth_basic_module.c
@@ -266,8 +266,8 @@ ngx_http_auth_basic_handler(ngx_http_request_t *r)
}
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
- "user \"%V\" was not found in \"%V\"",
- &r->headers_in.user, &user_file);
+ "user \"%V\" was not found in \"%s\"",
+ &r->headers_in.user, user_file.data);
return ngx_http_auth_basic_set_realm(r, &realm);
}