You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2019/03/18 09:16:07 UTC
svn commit: r1855741 - in /httpd/httpd/trunk: modules/ssl/mod_ssl.c
server/request.c server/util.c
Author: rpluem
Date: Mon Mar 18 09:16:06 2019
New Revision: 1855741
URL: http://svn.apache.org/viewvc?rev=1855741&view=rev
Log:
* Play safe in case we get no name
Modified:
httpd/httpd/trunk/modules/ssl/mod_ssl.c
httpd/httpd/trunk/server/request.c
httpd/httpd/trunk/server/util.c
Modified: httpd/httpd/trunk/modules/ssl/mod_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/mod_ssl.c?rev=1855741&r1=1855740&r2=1855741&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/mod_ssl.c (original)
+++ httpd/httpd/trunk/modules/ssl/mod_ssl.c Mon Mar 18 09:16:06 2019
@@ -491,6 +491,17 @@ static SSLConnRec *ssl_init_connection_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_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;
}
Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?rev=1855741&r1=1855740&r2=1855741&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Mon Mar 18 09:16:06 2019
@@ -195,7 +195,9 @@ AP_DECLARE(int) ap_process_request_inter
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
Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1855741&r1=1855740&r2=1855741&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Mon Mar 18 09:16:06 2019
@@ -573,6 +573,10 @@ AP_DECLARE(void) ap_no2slash_ex(char *na
char *d, *s;
+ if (!name || !*name) {
+ return;
+ }
+
s = d = name;
#ifdef HAVE_UNC_PATHS