httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1415008 - in /httpd/httpd/trunk: CHANGES server/core.c
Date Thu, 29 Nov 2012 00:24:45 GMT
Author: covener
Date: Thu Nov 29 00:24:44 2012
New Revision: 1415008

URL: http://svn.apache.org/viewvc?rev=1415008&view=rev
Log:
PR54222: catch invalid ServerTokens args


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=1415008&r1=1415007&r2=1415008&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Nov 29 00:24:44 2012
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) 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]
 

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1415008&r1=1415007&r2=1415008&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Thu Nov 29 00:24:44 2012
@@ -3234,9 +3234,12 @@ static const char *set_serv_tokens(cmd_p
     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, 'Min', 'Major', 'Minor', 'Prod', or 'Full'";
+    }
 
     return NULL;
 }



Mime
View raw message