diff --git a/bitwarden_license/src/Portal/Models/SsoConfigDataViewModel.cs b/bitwarden_license/src/Portal/Models/SsoConfigDataViewModel.cs index a9a7edb876..cc656503c7 100644 --- a/bitwarden_license/src/Portal/Models/SsoConfigDataViewModel.cs +++ b/bitwarden_license/src/Portal/Models/SsoConfigDataViewModel.cs @@ -210,6 +210,10 @@ namespace Bit.Portal.Models private string StripPemCertificateElements(string certificateText) { + if (string.IsNullOrWhiteSpace(certificateText)) + { + return null; + } return Regex.Replace(certificateText, @"(((BEGIN|END) CERTIFICATE)|([\-\n\r\t\s\f]))", string.Empty,