]> git.kaiwu.me - nginx.git/commitdiff
Auth basic: prevent null character in error log (ticket #1494).
authorVadim Filimonov <fffilimonov@yandex.ru>
Mon, 26 Feb 2018 14:52:20 +0000 (16:52 +0200)
committerVadim Filimonov <fffilimonov@yandex.ru>
Mon, 26 Feb 2018 14:52:20 +0000 (16:52 +0200)
src/http/modules/ngx_http_auth_basic_module.c

index 2f345b6d592f79841508ff814dc8f05d87aa69b6..a6f9ec46c8c22817f5ed49754079b386b5ab640a 100644 (file)
@@ -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);
 }