Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-02-23 18:31:18 +0300
committerIgor Sysoev <igor@sysoev.ru>2009-02-23 18:31:18 +0300
commit5336bd878b5addd9ef11ca8b63756ee1679393bc (patch)
tree63db803035b5c10b46f7b0969a6df249cd81cbbb
parent20018efe0f30d6f725daa15df6216356fdf655a6 (diff)
name/password were ignored after odd empty lines
-rw-r--r--src/http/modules/ngx_http_auth_basic_module.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c
index fe9102287..1c2333990 100644
--- a/src/http/modules/ngx_http_auth_basic_module.c
+++ b/src/http/modules/ngx_http_auth_basic_module.c
@@ -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]) {