# HG changeset patch # User Ruslan Ermilov # Date 1337174093 0 # Node ID 9c9fbdbe93835b296dd096498ca2971ba10cd977 # Parent b0e48bacb30183369bc4d35c4ac1910dfcdd5f9e Added syntax checking of the second parameter of the "split_clients" directive. diff --git a/src/http/modules/ngx_http_split_clients_module.c b/src/http/modules/ngx_http_split_clients_module.c --- 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 } 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++;