[nginx] Auth basic: prevent null character in error log (ticket #1494).
Maxim Dounin
mdounin at mdounin.ru
Mon Feb 26 17:52:13 UTC 2018
details: http://hg.nginx.org/nginx/rev/e48ac0136ee3
branches:
changeset: 7218:e48ac0136ee3
user: Vadim Filimonov <fffilimonov at yandex.ru>
date: Mon Feb 26 16:52:20 2018 +0200
description:
Auth basic: prevent null character in error log (ticket #1494).
diffstat:
src/http/modules/ngx_http_auth_basic_module.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c
--- 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_req
}
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);
}
More information about the nginx-devel
mailing list