comparison src/http/modules/ngx_http_auth_basic_module.c @ 7218:e48ac0136ee3

Auth basic: prevent null character in error log (ticket #1494).
author Vadim Filimonov <fffilimonov@yandex.ru>
date Mon, 26 Feb 2018 16:52:20 +0200
parents 4a670c18e5e6
children 0cb942c1c1aa
comparison
equal deleted inserted replaced
7217:8b70d4caa505 7218:e48ac0136ee3
264 264
265 return ngx_http_auth_basic_crypt_handler(r, &pwd, &realm); 265 return ngx_http_auth_basic_crypt_handler(r, &pwd, &realm);
266 } 266 }
267 267
268 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 268 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
269 "user \"%V\" was not found in \"%V\"", 269 "user \"%V\" was not found in \"%s\"",
270 &r->headers_in.user, &user_file); 270 &r->headers_in.user, user_file.data);
271 271
272 return ngx_http_auth_basic_set_realm(r, &realm); 272 return ngx_http_auth_basic_set_realm(r, &realm);
273 } 273 }
274 274
275 275