httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1302653 - in /httpd/httpd/trunk: CHANGES server/core.c
Date Mon, 19 Mar 2012 20:57:19 GMT
Author: sf
Date: Mon Mar 19 20:57:19 2012
New Revision: 1302653

URL: http://svn.apache.org/viewvc?rev=1302653&view=rev
Log:
In AllowOverrideList, do not allow 'None' together with other directives.
While there, improve log messages and save some memory by allocating correct
size for table.

PR 52823

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/server/core.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1302653&r1=1302652&r2=1302653&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Mar 19 20:57:19 2012
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) core: In AllowOverrideList, do not allow 'None' together with other
+     directives. PR 52823. [Stefan Fritsch]
+
   *) mod_proxy: Correctly set up reverse proxy worker. PR 52935.
      [Petter Berntsen <petterb gmail.com>]
 

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1302653&r1=1302652&r2=1302653&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Mon Mar 19 20:57:19 2012
@@ -1661,16 +1661,20 @@ static const char *set_override_list(cmd
     /* Throw a warning if we're in <Location> or <Files> */
     if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) {
         ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00115)
-                     "Useless use of AllowOverrideList in line %d of %s.",
-                     cmd->directive->line_num, cmd->directive->filename);
+                     "Useless use of AllowOverrideList at %s:%d",
+                     cmd->directive->filename, cmd->directive->line_num);
     }
     if ((err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS)) != NULL)
         return err;
 
-    d->override_list = apr_table_make(cmd->pool, 1);
+    d->override_list = apr_table_make(cmd->pool, argc);
 
     for (i=0;i<argc;i++){
         if (!strcasecmp(argv[i], "None")) {
+            if (argc != 1) {
+                return "'None' not allowed with other directives in "
+                       "AllowOverrideList";
+            }
             return NULL;
         }
         else {
@@ -1680,9 +1684,11 @@ static const char *set_override_list(cmd
             if (result)
                 apr_table_set(d->override_list, argv[i], "1");
             else
-                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00116)
-                             "Discarding unrecognized directive `%s' in AllowOverrideList.",
-                             argv[i]);
+                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
+                             APLOGNO(00116) "Discarding unrecognized "
+                             "directive `%s' in AllowOverrideList at %s:%d",
+                             argv[i], cmd->directive->filename,
+                             cmd->directive->line_num);
         }
     }
 



Mime
View raw message