Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
August 23, 2013 02:22PM
details: http://hg.nginx.org/nginx/rev/ee2a4c68fb35
branches:
changeset: 5339:ee2a4c68fb35
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
@@ -4766,7 +4766,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 725 August 23, 2013 02:22PM



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

Online Users

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