Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed invalid access to location defined as an empty string.

July 18, 2018 11:34AM
details: http://hg.nginx.org/nginx/rev/45e513c3540d
branches:
changeset: 7321:45e513c3540d
user: Ruslan Ermilov <ru@nginx.com>
date: Tue Jul 17 15:30:43 2018 +0300
description:
Fixed invalid access to location defined as an empty string.

diffstat:

src/http/modules/ngx_http_fastcgi_module.c | 2 +-
src/http/modules/ngx_http_grpc_module.c | 2 +-
src/http/modules/ngx_http_memcached_module.c | 2 +-
src/http/modules/ngx_http_proxy_module.c | 2 +-
src/http/modules/ngx_http_scgi_module.c | 2 +-
src/http/modules/ngx_http_uwsgi_module.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)

diffs (72 lines):

diff -r 696df3ac27ac -r 45e513c3540d src/http/modules/ngx_http_fastcgi_module.c
--- a/src/http/modules/ngx_http_fastcgi_module.c Tue Jul 17 12:53:23 2018 +0300
+++ b/src/http/modules/ngx_http_fastcgi_module.c Tue Jul 17 15:30:43 2018 +0300
@@ -3501,7 +3501,7 @@ ngx_http_fastcgi_pass(ngx_conf_t *cf, ng

clcf->handler = ngx_http_fastcgi_handler;

- if (clcf->name.data[clcf->name.len - 1] == '/') {
+ if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
clcf->auto_redirect = 1;
}

diff -r 696df3ac27ac -r 45e513c3540d src/http/modules/ngx_http_grpc_module.c
--- a/src/http/modules/ngx_http_grpc_module.c Tue Jul 17 12:53:23 2018 +0300
+++ b/src/http/modules/ngx_http_grpc_module.c Tue Jul 17 15:30:43 2018 +0300
@@ -4525,7 +4525,7 @@ ngx_http_grpc_pass(ngx_conf_t *cf, ngx_c

clcf->handler = ngx_http_grpc_handler;

- if (clcf->name.data[clcf->name.len - 1] == '/') {
+ if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
clcf->auto_redirect = 1;
}

diff -r 696df3ac27ac -r 45e513c3540d src/http/modules/ngx_http_memcached_module.c
--- a/src/http/modules/ngx_http_memcached_module.c Tue Jul 17 12:53:23 2018 +0300
+++ b/src/http/modules/ngx_http_memcached_module.c Tue Jul 17 15:30:43 2018 +0300
@@ -707,7 +707,7 @@ ngx_http_memcached_pass(ngx_conf_t *cf,

clcf->handler = ngx_http_memcached_handler;

- if (clcf->name.data[clcf->name.len - 1] == '/') {
+ if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
clcf->auto_redirect = 1;
}

diff -r 696df3ac27ac -r 45e513c3540d src/http/modules/ngx_http_proxy_module.c
--- a/src/http/modules/ngx_http_proxy_module.c Tue Jul 17 12:53:23 2018 +0300
+++ b/src/http/modules/ngx_http_proxy_module.c Tue Jul 17 15:30:43 2018 +0300
@@ -3580,7 +3580,7 @@ ngx_http_proxy_pass(ngx_conf_t *cf, ngx_

clcf->handler = ngx_http_proxy_handler;

- if (clcf->name.data[clcf->name.len - 1] == '/') {
+ if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
clcf->auto_redirect = 1;
}

diff -r 696df3ac27ac -r 45e513c3540d src/http/modules/ngx_http_scgi_module.c
--- a/src/http/modules/ngx_http_scgi_module.c Tue Jul 17 12:53:23 2018 +0300
+++ b/src/http/modules/ngx_http_scgi_module.c Tue Jul 17 15:30:43 2018 +0300
@@ -1857,7 +1857,7 @@ ngx_http_scgi_pass(ngx_conf_t *cf, ngx_c
return NGX_CONF_ERROR;
}

- if (clcf->name.data[clcf->name.len - 1] == '/') {
+ if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
clcf->auto_redirect = 1;
}

diff -r 696df3ac27ac -r 45e513c3540d src/http/modules/ngx_http_uwsgi_module.c
--- a/src/http/modules/ngx_http_uwsgi_module.c Tue Jul 17 12:53:23 2018 +0300
+++ b/src/http/modules/ngx_http_uwsgi_module.c Tue Jul 17 15:30:43 2018 +0300
@@ -2144,7 +2144,7 @@ ngx_http_uwsgi_pass(ngx_conf_t *cf, ngx_
return NGX_CONF_ERROR;
}

- if (clcf->name.data[clcf->name.len - 1] == '/') {
+ if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
clcf->auto_redirect = 1;
}

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

[nginx] Fixed invalid access to location defined as an empty string.

ru@nginx.com 205 July 18, 2018 11:34AM



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

Online Users

Guests: 113
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready