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 69523D3FC for ; Wed, 7 Nov 2012 08:33:29 +0000 (UTC) Received: (qmail 22444 invoked by uid 500); 7 Nov 2012 08:33:29 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 22291 invoked by uid 500); 7 Nov 2012 08:33:29 -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 22269 invoked by uid 99); 7 Nov 2012 08:33:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2012 08:33:28 +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; Wed, 07 Nov 2012 08:33:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A85242388ABB; Wed, 7 Nov 2012 08:33:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1406495 - in /httpd/httpd/trunk: CHANGES include/http_config.h server/core.c Date: Wed, 07 Nov 2012 08:33:06 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121107083306.A85242388ABB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sf Date: Wed Nov 7 08:33:05 2012 New Revision: 1406495 URL: http://svn.apache.org/viewvc?rev=1406495&view=rev Log: Make ap_check_cmd_context() treat sections like sections. This is necessary to properly disallow directives that don't work in . A separate NOT_IN_IF flag may be nicer, but would create much more hassle when being backported to 2.4. Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/include/http_config.h httpd/httpd/trunk/server/core.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1406495&r1=1406494&r2=1406495&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Wed Nov 7 08:33:05 2012 @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) Be more correct about rejecting directives that cannot work in + sections. [Stefan Fritsch] + *) core: Fix directives like LogLevel that need to know if they are invoked at virtual host context or in Directory/Files/Location/If sections to work properly in If sections that are not in a Directory/Files/Location. Modified: httpd/httpd/trunk/include/http_config.h URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/http_config.h?rev=1406495&r1=1406494&r2=1406495&view=diff ============================================================================== --- httpd/httpd/trunk/include/http_config.h (original) +++ httpd/httpd/trunk/include/http_config.h Wed Nov 7 08:33:05 2012 @@ -901,11 +901,11 @@ AP_DECLARE(const char *) ap_check_cmd_co #define NOT_IN_LIMIT 0x02 /**< Forbidden in <Limit> */ #define NOT_IN_DIRECTORY 0x04 /**< Forbidden in <Directory> */ #define NOT_IN_LOCATION 0x08 /**< Forbidden in <Location> */ -#define NOT_IN_FILES 0x10 /**< Forbidden in <Files> */ +#define NOT_IN_FILES 0x10 /**< Forbidden in <Files> or <If>*/ #define NOT_IN_HTACCESS 0x20 /**< Forbidden in .htaccess files */ -/** Forbidden in <Directory>/<Location>/<Files>*/ +/** Forbidden in <Directory>/<Location>/<Files><If>*/ #define NOT_IN_DIR_LOC_FILE (NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES) -/** Forbidden in <VirtualHost>/<Limit>/<Directory>/<Location>/<Files> */ +/** Forbidden in <VirtualHost>/<Limit>/<Directory>/<Location>/<Files>/<If> */ #define GLOBAL_ONLY (NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE) /** @} */ Modified: httpd/httpd/trunk/server/core.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1406495&r1=1406494&r2=1406495&view=diff ============================================================================== --- httpd/httpd/trunk/server/core.c (original) +++ httpd/httpd/trunk/server/core.c Wed Nov 7 08:33:05 2012 @@ -1144,7 +1144,10 @@ AP_DECLARE(const char *) ap_check_cmd_co || (found = find_parent(cmd->directive, "directive, "directive, "directive, "directive, "directive, "directive, "pool, cmd->cmd->name, gt, " cannot occur within ", found->directive, "> section", NULL);