diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-12-17 19:03:33 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-12-17 19:03:33 +0000 |
commit | c865f8dfa2826592b41b86e0048dd418c9eb86b8 (patch) | |
tree | ec42de5bb1d7035acfdccce5b309a3bd35d39b37 /src/http/modules/ngx_http_map_module.c | |
parent | b8a90c69039046ff6196b9e174e21c5377ed07dd (diff) | |
download | nginx-c865f8dfa2826592b41b86e0048dd418c9eb86b8.tar.gz nginx-c865f8dfa2826592b41b86e0048dd418c9eb86b8.zip |
Added checks that disallow adding a variable with an empty name.
Added variable name syntax checks to "geo" and "map" directives.
Diffstat (limited to 'src/http/modules/ngx_http_map_module.c')
-rw-r--r-- | src/http/modules/ngx_http_map_module.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c index 371737b2e..f5ee7673f 100644 --- a/src/http/modules/ngx_http_map_module.c +++ b/src/http/modules/ngx_http_map_module.c @@ -209,6 +209,13 @@ ngx_http_map_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } name = value[2]; + + if (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++; |