Mercurial > hg > nginx
diff src/http/modules/ngx_http_limit_conn_module.c @ 4963:9f4cdc7a8578
Fixed variable syntax checking in "set", "geo", "limit_conn_zone",
and "perl_set" directives.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 13 Dec 2012 15:05:19 +0000 |
parents | 21d1e3bcb356 |
children | 8b635cf36ccc |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_limit_conn_module.c +++ b/src/http/modules/ngx_http_limit_conn_module.c @@ -540,7 +540,7 @@ ngx_http_limit_conn_zone(ngx_conf_t *cf, continue; } - if (value[i].data[0] == '$') { + if (value[i].len > 1 && value[i].data[0] == '$') { value[i].len--; value[i].data++; @@ -613,7 +613,7 @@ ngx_http_limit_zone(ngx_conf_t *cf, ngx_ value = cf->args->elts; - if (value[2].data[0] != '$') { + if (value[2].len < 2 || value[2].data[0] != '$') { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "invalid variable name \"%V\"", &value[2]); return NGX_CONF_ERROR;