Added syntax checking of the second parameter of the "split_clients" directive.

This commit is contained in:
Ruslan Ermilov 2012-05-16 13:14:53 +00:00
parent 6888516b2b
commit 10c205a1b3

View File

@ -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++;