aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2012-05-16 13:14:53 +0000
committerRuslan Ermilov <ru@nginx.com>2012-05-16 13:14:53 +0000
commit10c205a1b3641fe5cc68051467c82becb3af11de (patch)
treeff18114500e46f4b076400fb751efb71d59a5182 /src
parent6888516b2bb4f9cce73184744a2ac5b44ce6752a (diff)
downloadnginx-10c205a1b3641fe5cc68051467c82becb3af11de.tar.gz
nginx-10c205a1b3641fe5cc68051467c82becb3af11de.zip
Added syntax checking of the second parameter of the "split_clients" directive.
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_split_clients_module.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_split_clients_module.c b/src/http/modules/ngx_http_split_clients_module.c
index 726269c3c..33a2fe73e 100644
--- a/src/http/modules/ngx_http_split_clients_module.c
+++ b/src/http/modules/ngx_http_split_clients_module.c
@@ -138,6 +138,13 @@ ngx_conf_split_clients_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
name = value[2];
+
+ 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++;