httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1031430 - in /httpd/httpd/trunk: CHANGES modules/generators/mod_autoindex.c
Date Fri, 05 Nov 2010 04:45:22 GMT
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;



Mime
View raw message