From 36a5a4b2ab65df347ac9018692868718ab8ae289 Mon Sep 17 00:00:00 2001 From: Patrick Pimentel Date: Tue, 10 Feb 2026 14:18:19 -0500 Subject: [PATCH] fix(redirect): [PM-30810] Https Redirection for Cloud Users - Fixed nullish issue. --- .../TokenProviders/DuoUniversalTokenService.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Core/Auth/Identity/TokenProviders/DuoUniversalTokenService.cs b/src/Core/Auth/Identity/TokenProviders/DuoUniversalTokenService.cs index 67110bb51a..43f0cbdd17 100644 --- a/src/Core/Auth/Identity/TokenProviders/DuoUniversalTokenService.cs +++ b/src/Core/Auth/Identity/TokenProviders/DuoUniversalTokenService.cs @@ -1,7 +1,4 @@ -// FIXME: Update this file to be null safe and then delete the line below -#nullable disable - -using System.Globalization; +using System.Globalization; using Bit.Core.Auth.Enums; using Bit.Core.Auth.Models; using Bit.Core.Auth.Models.Business.Tokenables; @@ -76,7 +73,7 @@ public interface IDuoUniversalTokenService /// /// TwoFactorProvider Duo or OrganizationDuo /// Duo.Client object or null - Task BuildDuoTwoFactorClientAsync(TwoFactorProvider provider); + Task BuildDuoTwoFactorClientAsync(TwoFactorProvider provider); } public class DuoUniversalTokenService( @@ -181,7 +178,7 @@ public class DuoUniversalTokenService( return null; } - string overrideFromForm = null; + string? overrideFromForm = null; if (httpContext.Request.HasFormContentType) { overrideFromForm = httpContext.Request.Form["deeplinkScheme"].FirstOrDefault(); @@ -236,7 +233,7 @@ public class DuoUniversalTokenService( _globalSettings.BaseServiceUri.Vault, clientName); } - public async Task BuildDuoTwoFactorClientAsync(TwoFactorProvider provider) + public async Task BuildDuoTwoFactorClientAsync(TwoFactorProvider provider) { var redirectUri = BuildDuoTwoFactorRedirectUri();