comparison src/http/modules/perl/ngx_http_perl_module.c @ 4972:8b635cf36ccc

Added checks that disallow adding a variable with an empty name. Added variable name syntax checks to "geo" and "map" directives.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 17 Dec 2012 19:03:33 +0000
parents 9f4cdc7a8578
children f1a91825730a
comparison
equal deleted inserted replaced
4971:eaf95350d75c 4972:8b635cf36ccc
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].len < 2 || value[1].data[0] != '$') { 971 if (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