]> granicus.if.org Git - apache/commitdiff
Merge r1415008, r1416150 from https://svn.apache.org/repos/asf/httpd/httpd/trunk/:
authorEric Covener <covener@apache.org>
Tue, 4 Dec 2012 02:20:17 +0000 (02:20 +0000)
committerEric Covener <covener@apache.org>
Tue, 4 Dec 2012 02:20:17 +0000 (02:20 +0000)
PR54222: catch invalid ServerTokens args

Submitted by: Jackie Zhang  <jackie.qq.zhang gmail.com>
Reviewed/modified by: covener

Sort error message for ServerTokens by increasing verbosity. Add missing 'OS'
variant.

Remove some trailing whitespace.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1416746 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/core.c

diff --git a/CHANGES b/CHANGES
index 64d03cf0933b99a6098489846e98b592b8920120..9b70819132bd2e99ef27f63e8d99d4e076391249 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.4
 
+  *) core: Fail startup if the argument to ServerTokens is unrecognized.
+     [Jackie Zhang  <jackie.qq.zhang gmail.com>]
+
   *) mod_log_forensic: Don't log a spurious "-" if a request has been rejected
      before mod_log_forensic could attach its id to it. [Stefan Fritsch]
 
diff --git a/STATUS b/STATUS
index b612d76996063ed63503482a31ac95df738d9654..34e235c5da3d0ac998096c1c982a50d48461fd3c 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -97,15 +97,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
       2.4.x patch: http://people.apache.org/~jailletc36/backport_mod_dumpio.patch
       +1: jailletc36, sf, druggeri
      
-    * core: fail startup if ServerTokens arg is unrecognized, PR54222
-      trunk patch: http://svn.apache.org/viewvc?rev=1415008&view=rev
-                   http://svn.apache.org/viewvc?rev=1416150&view=rev
-      2.4.x patch: trunk works
-      +1: covener, sf, druggeri
-          Is fail startup okay? What about warn and set to PROD? 
-      sf: I think that's ok. It will be immediately obvious after upgrade and
-          is easy to fix in the configuration.
     * core: Accept "Include /some/dir" without wildcards as documented, 
             regression from 2.2.x.  PR54223
       trunk patch: http://svn.apache.org/viewvc?rev=1415023&view=rev
index 03137577de2a167fe73e81a61c0b38a983121c9c..a09c8a05cb2ab7bb8ae66cd4957048a86fc2f9cb 100644 (file)
@@ -3222,9 +3222,12 @@ static const char *set_serv_tokens(cmd_parms *cmd, void *dummy,
     else if (!strcasecmp(arg1, "Prod") || !strcasecmp(arg1, "ProductOnly")) {
         ap_server_tokens = SrvTk_PRODUCT_ONLY;
     }
-    else {
+    else if (!strcasecmp(arg1, "Full")) {
         ap_server_tokens = SrvTk_FULL;
     }
+    else {
+        return "ServerTokens takes 1 argument, 'Prod', 'Major', 'Minor', 'Min', 'OS', or 'Full'";
+    }
 
     return NULL;
 }