[nginx] svn commit: r4636 - trunk/src/http/modules

ru at nginx.com ru at nginx.com
Wed May 16 13:14:53 UTC 2012


Author: ru
Date: 2012-05-16 13:14:53 +0000 (Wed, 16 May 2012)
New Revision: 4636
URL: http://trac.nginx.org/nginx/changeset/4636/nginx

Log:
Added syntax checking of the second parameter of the "split_clients" directive.


Modified:
   trunk/src/http/modules/ngx_http_split_clients_module.c

Modified: trunk/src/http/modules/ngx_http_split_clients_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_split_clients_module.c	2012-05-16 13:09:39 UTC (rev 4635)
+++ trunk/src/http/modules/ngx_http_split_clients_module.c	2012-05-16 13:14:53 UTC (rev 4636)
@@ -138,6 +138,13 @@
     }
 
     name = value[2];
+
+    if (name.len < 2 || name.data[0] != '$') {
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                           "invalid variable name \"%V\"", &name);
+        return NGX_CONF_ERROR;
+    }
+
     name.len--;
     name.data++;
 



More information about the nginx-devel mailing list