comparison src/http/modules/ngx_http_rewrite_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 ed957e0daeb4
children 8b635cf36ccc
comparison
equal deleted inserted replaced
4962:13a5202b6b4b 4963:9f4cdc7a8578
906 ngx_http_script_var_code_t *vcode; 906 ngx_http_script_var_code_t *vcode;
907 ngx_http_script_var_handler_code_t *vhcode; 907 ngx_http_script_var_handler_code_t *vhcode;
908 908
909 value = cf->args->elts; 909 value = cf->args->elts;
910 910
911 if (value[1].data[0] != '$') { 911 if (value[1].len < 2 || value[1].data[0] != '$') {
912 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 912 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
913 "invalid variable name \"%V\"", &value[1]); 913 "invalid variable name \"%V\"", &value[1]);
914 return NGX_CONF_ERROR; 914 return NGX_CONF_ERROR;
915 } 915 }
916 916