Blame SOURCES/0004-CVE_2019_13038.patch

fe55d9
From 297093e6a48a4c0fd307c2206c59a8c8eb84fb53 Mon Sep 17 00:00:00 2001
fe55d9
From: Valentin <awakenine@users.noreply.github.com>
fe55d9
Date: Fri, 6 Sep 2019 13:30:36 +0300
fe55d9
Subject: [PATCH] Update auth_mellon_mode.c
fe55d9
fe55d9
Fix open redirect CVE-2019-13038
fe55d9
---
fe55d9
 auth_mellon_util.c | 4 ++++
fe55d9
 1 file changed, 4 insertions(+)
fe55d9
fe55d9
diff --git a/auth_mellon_util.c b/auth_mellon_util.c
fe55d9
index fd442f9..7dff61e 100644
fe55d9
--- a/auth_mellon_util.c
fe55d9
+++ b/auth_mellon_util.c
fe55d9
@@ -116,6 +116,10 @@ int am_validate_redirect_url(request_rec *r, const char *url)
fe55d9
 
fe55d9
     /* Sanity check of the scheme of the domain. We only allow http and https. */
fe55d9
     if (uri.scheme) {
fe55d9
+	/* http and https schemes without hostname are invalid. */
fe55d9
+        if (!uri.hostname) {
fe55d9
+            return HTTP_BAD_REQUEST;
fe55d9
+	}
fe55d9
         if (strcasecmp(uri.scheme, "http")
fe55d9
             && strcasecmp(uri.scheme, "https")) {
fe55d9
             AM_LOG_RERROR(APLOG_MARK, APLOG_ERR, 0, r,
fe55d9
-- 
fe55d9
2.21.0
fe55d9