diff src/http/modules/ngx_http_rewrite_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 16a371063d20
line wrap: on
line diff
--- a/src/http/modules/ngx_http_rewrite_module.c
+++ b/src/http/modules/ngx_http_rewrite_module.c
@@ -908,7 +908,7 @@ ngx_http_rewrite_set(ngx_conf_t *cf, ngx
 
     value = cf->args->elts;
 
-    if (value[1].len < 2 || value[1].data[0] != '$') {
+    if (value[1].data[0] != '$') {
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "invalid variable name \"%V\"", &value[1]);
         return NGX_CONF_ERROR;