From 10c205a1b3641fe5cc68051467c82becb3af11de Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 16 May 2012 13:14:53 +0000 Subject: [PATCH] Added syntax checking of the second parameter of the "split_clients" directive. --- src/http/modules/ngx_http_split_clients_module.c | 7 +++++++ 1 file changed, 7 insertions(+) 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++;