1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-16 01:51:21 +01:00

Fix server 500 error when enabling 2FA policy from Portal (#1254)

* Fix illegal chars in senderTag

* add null check
This commit is contained in:
Thomas Rittson 2021-04-05 08:33:19 +10:00 committed by GitHub
parent 597fa01344
commit 4b98361684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;