Mercurial > hg > nginx
diff src/http/modules/ngx_http_rewrite_module.c @ 4636:ed957e0daeb4
Capped the status code that may be returned with "return" and "try_files".
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 16 May 2012 13:22:03 +0000 |
parents | 778ef9c3fd2d |
children | 9f4cdc7a8578 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_rewrite_module.c +++ b/src/http/modules/ngx_http_rewrite_module.c @@ -485,6 +485,12 @@ ngx_http_rewrite_return(ngx_conf_t *cf, } else { + if (ret->status > 999) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid return code \"%V\"", &value[1]); + return NGX_CONF_ERROR; + } + if (cf->args->nelts == 2) { return NGX_CONF_OK; }