Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4637 - in trunk/src/http: . modules

Anonymous User
May 16, 2012 09:24AM
Author: ru
Date: 2012-05-16 13:22:03 +0000 (Wed, 16 May 2012)
New Revision: 4637
URL: http://trac.nginx.org/nginx/changeset/4637/nginx

Log:
Capped the status code that may be returned with "return" and "try_files".


Modified:
trunk/src/http/modules/ngx_http_rewrite_module.c
trunk/src/http/ngx_http_core_module.c

Modified: trunk/src/http/modules/ngx_http_rewrite_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_rewrite_module.c 2012-05-16 13:14:53 UTC (rev 4636)
+++ trunk/src/http/modules/ngx_http_rewrite_module.c 2012-05-16 13:22:03 UTC (rev 4637)
@@ -485,6 +485,12 @@

} 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;
}

Modified: trunk/src/http/ngx_http_core_module.c
===================================================================
--- trunk/src/http/ngx_http_core_module.c 2012-05-16 13:14:53 UTC (rev 4636)
+++ trunk/src/http/ngx_http_core_module.c 2012-05-16 13:22:03 UTC (rev 4637)
@@ -4662,7 +4662,7 @@

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);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4637 - in trunk/src/http: . modules

Anonymous User 1253 May 16, 2012 09:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 279
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready