You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2012/10/11 19:11:32 UTC
svn commit: r1397172 - in /httpd/httpd/trunk: CHANGES server/config.c
Author: trawick
Date: Thu Oct 11 17:11:31 2012
New Revision: 1397172
URL: http://svn.apache.org/viewvc?rev=1397172&view=rev
Log:
"Iterate" directives: Report an error if no arguments are provided.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/server/config.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1397172&r1=1397171&r2=1397172&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Oct 11 17:11:31 2012
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) "Iterate" directives: Report an error if no arguments are provided.
+ [Jeff Trawick]
+
*) htpasswd, htdbm: Optionally read passwords from stdin, as more
secure alternative to -b. PR 40243. [Adomas Paltanavicius <adomas
paltanavicius gmail com>, Stefan Fritsch]
Modified: httpd/httpd/trunk/server/config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/config.c?rev=1397172&r1=1397171&r2=1397172&view=diff
==============================================================================
--- httpd/httpd/trunk/server/config.c (original)
+++ httpd/httpd/trunk/server/config.c Thu Oct 11 17:11:31 2012
@@ -980,12 +980,20 @@ static const char *invoke_cmd(const comm
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
case ITERATE:
- while (*(w = ap_getword_conf(parms->pool, &args)) != '\0') {
+ w = ap_getword_conf(parms->pool, &args);
+
+ if (*w == '\0')
+ return apr_pstrcat(parms->pool, cmd->name,
+ " requires at least one argument",
+ cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
+ while (*w != '\0') {
errmsg = cmd->AP_TAKE1(parms, mconfig, w);
if (errmsg && strcmp(errmsg, DECLINE_CMD) != 0)
return errmsg;
+
+ w = ap_getword_conf(parms->pool, &args);
}
return errmsg;