From 3662a5a8a18fa85d4bf6673d6d9bd5f3176c434d Mon Sep 17 00:00:00 2001 From: Parthasarathy Dharmalingam Date: Mon, 11 May 2020 18:35:24 +0530 Subject: [PATCH] Access URL addition in Request handled. --- Myrtille.Web/Default.aspx.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Myrtille.Web/Default.aspx.cs b/Myrtille.Web/Default.aspx.cs index fbdc08f..0a6d809 100644 --- a/Myrtille.Web/Default.aspx.cs +++ b/Myrtille.Web/Default.aspx.cs @@ -539,6 +539,7 @@ private static JObject SecurdenWebRequest(string serverUrl, string requestUrl, s } ServicePointManager.ServerCertificateValidationCallback = TrustCertificate; + ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12; var uri = new Uri(requestUrl); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); request.Method = requestMethod; @@ -572,7 +573,20 @@ private JObject ProcessLaunchRequest(string serverUrl, string authKey) { JObject returnObj = null; JObject paramObj = new JObject(new JProperty("AUTH_KEY", authKey)); - JObject response = SecurdenWebRequest(serverUrl, "/launcher/verify_launch_info", "POST", paramObj); + JObject response = null; + if (Request["access_url"] != null && Request["access_url"].Trim() != "") + { + string accessUrl = Request["access_url"].Trim(); + if (accessUrl.EndsWith("/")) + { + accessUrl = accessUrl.Substring(0, accessUrl.Length - 1); + } + response = SecurdenWebRequest(accessUrl, "/launcher/verify_launch_info", "POST", paramObj); + } + if (response == null) + { + response = SecurdenWebRequest(serverUrl, "/launcher/verify_launch_info", "POST", paramObj); + } if (response == null) { Response.Write("");