Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed try_files with empty argument (ticket #390).

Maxim Dounin
October 08, 2013 08:14AM
details: http://hg.nginx.org/nginx/rev/ddf740b9fdf6
branches: stable-1.4
changeset: 5416:ddf740b9fdf6
user: Maxim Dounin <mdounin@mdounin.ru>
date: Fri Aug 23 22:18:39 2013 +0400
description:
Fixed try_files with empty argument (ticket #390).

diffstat:

src/http/ngx_http_core_module.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -4758,7 +4758,9 @@ ngx_http_core_try_files(ngx_conf_t *cf,

tf[i].name = value[i + 1];

- if (tf[i].name.data[tf[i].name.len - 1] == '/') {
+ if (tf[i].name.len > 0
+ && tf[i].name.data[tf[i].name.len - 1] == '/')
+ {
tf[i].test_dir = 1;
tf[i].name.len--;
tf[i].name.data[tf[i].name.len] = '\0';

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

[nginx] Fixed try_files with empty argument (ticket #390).

Maxim Dounin 668 October 08, 2013 08:14AM



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

Online Users

Guests: 121
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