]> granicus.if.org Git - apache/commitdiff
* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Omit further
authorJoe Orton <jorton@apache.org>
Tue, 6 Dec 2005 10:21:41 +0000 (10:21 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 6 Dec 2005 10:21:41 +0000 (10:21 +0000)
access control checks if SSL is not in use regardless of vhost
settings.

Submitted by: Rüdiger Plüm, Joe Orton
PR: 37791

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354394 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ssl/ssl_engine_kernel.c

diff --git a/CHANGES b/CHANGES
index 3fec516c175c05bf92efc89da7a045f2ea896863..d1291637a37fc3175310e705079d9eebbadb5feb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,12 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_ssl: Fix a possible crash during access control checks if a
+     non-SSL request is processed for an SSL vhost (such as the
+     "HTTP request received on SSL port" error message when an 400 
+     ErrorDocument is configured, or if using "SSLEngine optional").
+     PR 37791.  [Rüdiger Plüm, Joe Orton]
+
   *) mod_proxy_balancer: Sticky session identifiers supplied in URL do not work.
      PR37753. [Ruediger Pluem, Kazuhiro Osawa <ko yappo.ne.jp>]
 
index 688cb473590fe1b73f44269232f2f7538d651c4c..4ca5931923076c48d5b24dc58f49dd84464cdb32 100644 (file)
@@ -202,11 +202,14 @@ int ssl_hook_Access(request_rec *r)
     }
 
     /*
-     * Check to see if SSL protocol is on
+     * Check to see whether SSL is in use; if it's not, then no
+     * further access control checks are relevant.  (the test for
+     * sc->enabled is probably strictly unnecessary)
      */
-    if (!((sc->enabled == SSL_ENABLED_TRUE) || (sc->enabled == SSL_ENABLED_OPTIONAL) || ssl)) {
+    if (sc->enabled == SSL_ENABLED_FALSE || !ssl) {
         return DECLINED;
     }
+
     /*
      * Support for per-directory reconfigured SSL connection parameters.
      *