comparison src/http/modules/perl/ngx_http_perl_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 d620f497c50f
children 8b635cf36ccc
comparison
equal deleted inserted replaced
4962:13a5202b6b4b 4963:9f4cdc7a8578
966 ngx_http_perl_variable_t *pv; 966 ngx_http_perl_variable_t *pv;
967 ngx_http_perl_main_conf_t *pmcf; 967 ngx_http_perl_main_conf_t *pmcf;
968 968
969 value = cf->args->elts; 969 value = cf->args->elts;
970 970
971 if (value[1].data[0] != '$') { 971 if (value[1].len < 2 || value[1].data[0] != '$') {
972 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 972 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
973 "invalid variable name \"%V\"", &value[1]); 973 "invalid variable name \"%V\"", &value[1]);
974 return NGX_CONF_ERROR; 974 return NGX_CONF_ERROR;
975 } 975 }
976 976