mirror of
https://github.com/nginx/nginx.git
synced 2024-11-26 02:40:46 -06:00
name/password were ignored after odd empty lines
This commit is contained in:
parent
20018efe0f
commit
5336bd878b
@ -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…
Reference in New Issue
Block a user