Mercurial > hg > nginx
diff src/http/modules/ngx_http_geo_module.c @ 4963:9f4cdc7a8578
Fixed variable syntax checking in "set", "geo", "limit_conn_zone",
and "perl_set" directives.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 13 Dec 2012 15:05:19 +0000 |
parents | f57154322e0e |
children | a9d60fafaa85 |
line wrap: on
line diff
--- 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_c } 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++;