From f37e8dd3bbdb0adbf703a96fbde38623bc3c47ff Mon Sep 17 00:00:00 2001 From: Ersei Saggi Date: Mon, 7 Aug 2023 12:14:52 -0400 Subject: [PATCH] fix: handle empty and invalid strings in the schemeOverride --- SSO-Auth/Api/SSOController.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SSO-Auth/Api/SSOController.cs b/SSO-Auth/Api/SSOController.cs index 81599cc..dfd6e9f 100644 --- a/SSO-Auth/Api/SSOController.cs +++ b/SSO-Auth/Api/SSOController.cs @@ -1050,6 +1050,11 @@ public class SSOController : ControllerBase requestPort = -1; } + if (schemeOverride != "http" && schemeOverride != "https") + { + schemeOverride = null; + } + return new UriBuilder { Scheme = schemeOverride ?? Request.Scheme,