Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3CD43D9D4 for ; Thu, 11 Oct 2012 17:12:17 +0000 (UTC) Received: (qmail 39530 invoked by uid 500); 11 Oct 2012 17:12:17 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 39439 invoked by uid 500); 11 Oct 2012 17:12:16 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 39431 invoked by uid 99); 11 Oct 2012 17:12:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2012 17:12:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2012 17:12:15 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 540D8238899C; Thu, 11 Oct 2012 17:11:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1397172 - in /httpd/httpd/trunk: CHANGES server/config.c Date: Thu, 11 Oct 2012 17:11:32 -0000 To: cvs@httpd.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121011171132.540D8238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 , 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;