From ba290091cf2c369ae36c6c3845f770f85f1172e6 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Thu, 13 Dec 2012 15:05:19 +0000 Subject: Fixed variable syntax checking in "set", "geo", "limit_conn_zone", and "perl_set" directives. --- src/http/modules/perl/ngx_http_perl_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/http/modules/perl/ngx_http_perl_module.c') diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index 90e32e80e..028b9f199 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -968,7 +968,7 @@ ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) value = cf->args->elts; - if (value[1].data[0] != '$') { + if (value[1].len < 2 || value[1].data[0] != '$') { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "invalid variable name \"%V\"", &value[1]); return NGX_CONF_ERROR; -- cgit