mirror of
https://github.com/nginx/nginx.git
synced 2026-08-27 04:07:18 +00:00
name/password were ignored after odd empty lines
This commit is contained in:
parent
20018efe0f
commit
5336bd878b
1 changed files with 10 additions and 3 deletions
|
|
@ -176,9 +176,16 @@ ngx_http_auth_basic_handler(ngx_http_request_t *r)
|
|||
switch (state) {
|
||||
|
||||
case sw_login:
|
||||
if (login == 0 && buf[i] == '#') {
|
||||
state = sw_skip;
|
||||
break;
|
||||
if (login == 0) {
|
||||
|
||||
if (buf[i] == '#' || buf[i] == CR) {
|
||||
state = sw_skip;
|
||||
break;
|
||||
}
|
||||
|
||||
if (buf[i] == LF) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (buf[i] != r->headers_in.user.data[login]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue