summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-06-29 17:28:41 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-06-29 17:28:41 +0000
commit71b7e2294a68c802930b239e2ed2eda895206846 (patch)
tree5a3167e24aa68312f7a59e6f761d1ce33810e338 /src/http/ngx_http_core_module.c
parenta4b7871ac73e1ad33729a060ab0370d0c0293782 (diff)
downloadnginx-71b7e2294a68c802930b239e2ed2eda895206846.tar.gz
nginx-71b7e2294a68c802930b239e2ed2eda895206846.tar.bz2
Merge of r4636, r4637, r4638: config sanity checks.
*) Added syntax checking of the second parameter of the "split_clients" directive. *) Capped the status code that may be returned with "return" and "try_files". *) Zero padded the returned and logged HTTP status code, and fixed possible buffer overrun in $status handling.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 31832ceb8..5bb01d9ea 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -4662,7 +4662,7 @@ ngx_http_core_try_files(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
code = ngx_atoi(tf[i - 1].name.data + 1, tf[i - 1].name.len - 2);
- if (code == NGX_ERROR) {
+ if (code == NGX_ERROR || code > 999) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"invalid code \"%*s\"",
tf[i - 1].name.len - 1, tf[i - 1].name.data);