Auth basic: prevent null character in error log (ticket #1494).

This commit is contained in:
Vadim Filimonov 2018-02-26 16:52:20 +02:00
parent dd7dba520c
commit f607032e0c

View 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);
}