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/ngx_http_geo_module.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/http/modules/ngx_http_geo_module.c') diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index fce87a8cb..bdad969a1 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -322,6 +322,13 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } name = value[1]; + + if (name.len < 2 || name.data[0] != '$') { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid variable name \"%V\"", &name); + return NGX_CONF_ERROR; + } + name.len--; name.data++; -- cgit