From 4b9836168450722a2348b2919a49d1940d5d6ad6 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Mon, 5 Apr 2021 08:33:19 +1000 Subject: [PATCH] Fix server 500 error when enabling 2FA policy from Portal (#1254) * Fix illegal chars in senderTag * add null check --- .../Services/Implementations/AmazonSesMailDeliveryService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Services/Implementations/AmazonSesMailDeliveryService.cs b/src/Core/Services/Implementations/AmazonSesMailDeliveryService.cs index 75d98c633c..ad1bc36045 100644 --- a/src/Core/Services/Implementations/AmazonSesMailDeliveryService.cs +++ b/src/Core/Services/Implementations/AmazonSesMailDeliveryService.cs @@ -59,7 +59,7 @@ namespace Bit.Core.Services _logger = logger; _client = amazonSimpleEmailService; _source = $"\"{globalSettings.SiteName}\" <{globalSettings.Mail.ReplyToEmail}>"; - _senderTag = $"Server_{globalSettings.ProjectName}"; + _senderTag = $"Server_{globalSettings.ProjectName?.Replace(' ', '_')}"; if (!string.IsNullOrWhiteSpace(_globalSettings.Mail.AmazonConfigSetName)) { _configSetName = _globalSettings.Mail.AmazonConfigSetName;