Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 5772 invoked from network); 5 Nov 2010 04:46:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Nov 2010 04:46:08 -0000 Received: (qmail 7445 invoked by uid 500); 5 Nov 2010 04:46:39 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 7240 invoked by uid 500); 5 Nov 2010 04:46:37 -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 7233 invoked by uid 99); 5 Nov 2010 04:46:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Nov 2010 04:46:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Fri, 05 Nov 2010 04:46:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4A8082388903; Fri, 5 Nov 2010 04:45:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1031430 - in /httpd/httpd/trunk: CHANGES modules/generators/mod_autoindex.c Date: Fri, 05 Nov 2010 04:45:22 -0000 To: cvs@httpd.apache.org From: covener@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101105044522.4A8082388903@eris.apache.org> Author: covener Date: Fri Nov 5 04:45:21 2010 New Revision: 1031430 URL: http://svn.apache.org/viewvc?rev=1031430&view=rev Log: PR#47766 mod_autoindex directives not merged into sections with no autoindex directives. This is due to an empty "opts" field looking just like one that has specified "None". None is always alone, so simplify and test for equality. Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/modules/generators/mod_autoindex.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1031430&r1=1031429&r2=1031430&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Fri Nov 5 04:45:21 2010 @@ -6,6 +6,10 @@ Changes with Apache 2.3.9 Fix a denial of service attack against mod_reqtimeout. [Stefan Fritsch] + *) mod_autoindex: Fix inheritance of mod_autoindex directives into + contexts that don't have any mod_autoindex directives. PR47766. + [Eric Covener] + *) mod_rewrite: Add END flag for RewriteRule to prevent further rounds of rewrite processing when a per-directory substitution occurs. [Eric Covener] Modified: httpd/httpd/trunk/modules/generators/mod_autoindex.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_autoindex.c?rev=1031430&r1=1031429&r2=1031430&view=diff ============================================================================== --- httpd/httpd/trunk/modules/generators/mod_autoindex.c (original) +++ httpd/httpd/trunk/modules/generators/mod_autoindex.c Fri Nov 5 04:45:21 2010 @@ -72,6 +72,7 @@ module AP_MODULE_DECLARE_DATA autoindex_ #define EMIT_XHTML (1 << 17) #define SHOW_FORBIDDEN (1 << 18) #define ADDALTCLASS (1 << 19) +#define OPTION_UNSET (1 << 20) #define K_NOADJUST 0 #define K_ADJUST 1 @@ -619,7 +620,7 @@ static void *create_autoindex_config(apr new->alt_list = apr_array_make(p, 4, sizeof(struct item)); new->desc_list = apr_array_make(p, 4, sizeof(ai_desc_t)); new->ign_list = apr_array_make(p, 4, sizeof(struct item)); - new->opts = 0; + new->opts = OPTION_UNSET; new->incremented_opts = 0; new->decremented_opts = 0; new->default_keyid = '\0'; @@ -655,9 +656,9 @@ static void *merge_autoindex_configs(apr new->ign_list = apr_array_append(p, add->ign_list, base->ign_list); new->desc_list = apr_array_append(p, add->desc_list, base->desc_list); new->icon_list = apr_array_append(p, add->icon_list, base->icon_list); - if (add->opts & NO_OPTIONS) { + if (add->opts == NO_OPTIONS) { /* - * If the current directory says 'no options' then we also + * If the current directory explicitly says 'no options' then we also * clear any incremental mods from being inheritable further down. */ new->opts = NO_OPTIONS; @@ -671,7 +672,7 @@ static void *merge_autoindex_configs(apr * Contrariwise, we *do* inherit if the only settings here are * incremental ones. */ - if (add->opts == 0) { + if (add->opts == OPTION_UNSET) { new->incremented_opts = (base->incremented_opts | add->incremented_opts) & ~add->decremented_opts;