diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-12-13 15:05:19 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-12-13 15:05:19 +0000 |
commit | ba290091cf2c369ae36c6c3845f770f85f1172e6 (patch) | |
tree | e9ab602ead9bc74a47760533e85f2eaed97c789d /src/http/modules/ngx_http_geo_module.c | |
parent | b3430993f1ededfd1aa5544abbf75064d8589566 (diff) | |
download | nginx-ba290091cf2c369ae36c6c3845f770f85f1172e6.tar.gz nginx-ba290091cf2c369ae36c6c3845f770f85f1172e6.zip |
Fixed variable syntax checking in "set", "geo", "limit_conn_zone",
and "perl_set" directives.
Diffstat (limited to 'src/http/modules/ngx_http_geo_module.c')
-rw-r--r-- | src/http/modules/ngx_http_geo_module.c | 7 |
1 files changed, 7 insertions, 0 deletions
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++; |