summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-11-10 07:40:13 +0000
committerJonathan Kolb <jon@b0g.us>2005-11-10 07:40:13 +0000
commit3f1a03007279c07d1cfa8bc658d36059b13f66d2 (patch)
tree4b3b236fcd1aab4fd9c1779aeef06cfc779c0a9a /src
parent9f37f031576124ed88a366eb26b3cd3bdb32c034 (diff)
downloadnginx-0.3.9.tar.gz
Changes with nginx 0.3.9 10 Nov 2005v0.3.9
*) Bugfix: nginx considered URI as unsafe if two any symbols was between two slashes; bug appeared in 0.3.8.
Diffstat (limited to 'src')
-rw-r--r--src/core/nginx.h2
-rw-r--r--src/http/ngx_http_parse.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 966d405b0..c498e0719 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VER "nginx/0.3.8"
+#define NGINX_VER "nginx/0.3.9"
#define NGINX_VAR "NGINX"
#define NGX_OLDPID_EXT ".oldbin"
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index 0001286c6..b2e2f9e3f 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -1056,7 +1056,7 @@ ngx_http_parse_unsafe_uri(ngx_http_request_t *r, ngx_str_t *uri,
/* detect "/../" */
- if (p[2] == '/') {
+ if (p[0] == '.' && p[1] == '.' && p[2] == '/') {
goto unsafe;
}
@@ -1070,7 +1070,9 @@ ngx_http_parse_unsafe_uri(ngx_http_request_t *r, ngx_str_t *uri,
/* detect "/.../" */
- if (p[3] == '/' || p[3] == '\\') {
+ if (p[0] == '.' && p[1] == '.' && p[2] == '.'
+ && (p[3] == '/' || p[3] == '\\'))
+ {
goto unsafe;
}
}