]> granicus.if.org Git - apache/commitdiff
* Play safe in case we get no name
authorRuediger Pluem <rpluem@apache.org>
Mon, 18 Mar 2019 09:16:06 +0000 (09:16 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 18 Mar 2019 09:16:06 +0000 (09:16 +0000)
Reverted by r1855742.

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

modules/ssl/mod_ssl.c
server/request.c
server/util.c

index 9a2e7460408f1b2c9f760697fbff7cd08d2f7cad..b08cd96f7ef71291e3ee37428c5a2efcced46626 100644 (file)
@@ -491,6 +491,17 @@ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c,
 {
     SSLConnRec *sslconn = myConnConfig(c);
 
+    /* Reinit dc in any case because it may be r->per_dir_config scoped
+     * and thus a caller like mod_proxy needs to update it per request.
+     */
+    if (per_dir_config) {
+        sslconn->dc = ap_get_module_config(per_dir_config, &ssl_module);
+    }
+    else {
+        sslconn->dc = ap_get_module_config(c->base_server->lookup_defaults,
+                                           &ssl_module);
+    }
+
     if (!sslconn) {
         sslconn = apr_pcalloc(c->pool, sizeof(*sslconn));
 
@@ -508,17 +519,6 @@ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c,
         myConnConfigSet(c, sslconn);
     }
 
-    /* Reinit dc in any case because it may be r->per_dir_config scoped
-     * and thus a caller like mod_proxy needs to update it per request.
-     */
-    if (per_dir_config) {
-        sslconn->dc = ap_get_module_config(per_dir_config, &ssl_module);
-    }
-    else {
-        sslconn->dc = ap_get_module_config(c->base_server->lookup_defaults,
-                                           &ssl_module);
-    }
-
     return sslconn;
 }
 
index 052e20b3dd5847ba71334a59b5aab25ade87e3de..a448fa7af5f4d2f98e50b7942bf0ac5372af5896 100644 (file)
@@ -195,7 +195,9 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
     ap_getparents(r->uri);     /* OK --- shrinking transformations... */
     if (sconf->merge_slashes != AP_CORE_CONFIG_OFF) { 
         ap_no2slash(r->uri);
-        ap_no2slash(r->parsed_uri.path);
+        if (r->parsed_uri.path) {
+            ap_no2slash(r->parsed_uri.path);
+        }
      }
 
     /* All file subrequests are a huge pain... they cannot bubble through the
index 89c5abef80b2cdb7f222eaa325bd04e3adb7893b..8633c6294a86d495b8a24085a128c72a7d4911b9 100644 (file)
@@ -573,6 +573,10 @@ AP_DECLARE(void) ap_no2slash_ex(char *name, int is_fs_path)
 
     char *d, *s;
 
+    if (!name || !*name) {
+        return;
+    }
+
     s = d = name;
 
 #ifdef HAVE_UNC_PATHS