From b87fee44f9c5cfbbac6f972f73d4735fb065cb51 Mon Sep 17 00:00:00 2001 From: pmaytak <34331512+pmaytak@users.noreply.github.com> Date: Tue, 20 Jul 2021 02:02:26 -0700 Subject: [PATCH] Added check to parse AuthResult from URI if post data is null. --- .../WindowsFormsWebAuthenticationDialogBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/Microsoft.Identity.Client/Platforms/Features/WinFormsLegacyWebUi/WindowsFormsWebAuthenticationDialogBase.cs b/src/client/Microsoft.Identity.Client/Platforms/Features/WinFormsLegacyWebUi/WindowsFormsWebAuthenticationDialogBase.cs index 81dd7d42de..b3b75a10be 100644 --- a/src/client/Microsoft.Identity.Client/Platforms/Features/WinFormsLegacyWebUi/WindowsFormsWebAuthenticationDialogBase.cs +++ b/src/client/Microsoft.Identity.Client/Platforms/Features/WinFormsLegacyWebUi/WindowsFormsWebAuthenticationDialogBase.cs @@ -205,7 +205,7 @@ private bool CheckForClosingUrl(Uri url, byte[] postData = null) url.AbsolutePath.Equals(_desiredCallbackUri.AbsolutePath)) { RequestContext.Logger.Info("[Legacy WebView] Redirect URI was reached. Stopping WebView navigation..."); - Result = AuthorizationResult.FromPostData(postData); + Result = postData != null ? AuthorizationResult.FromPostData(postData) : AuthorizationResult.FromUri(url.OriginalString); readyToClose = true; }