1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

fix: Fix null handling in SendLicenseExpiredAsync method (#3122)

This commit is contained in:
GSWXXN 2024-08-27 13:21:24 -04:00 committed by GitHub
parent 0a6c35e56c
commit 46955d469b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -410,10 +410,11 @@ public class HandlebarsMailService : IMailService
public async Task SendLicenseExpiredAsync(IEnumerable<string> emails, string organizationName = null)
{
var message = CreateDefaultMessage("License Expired", emails);
var model = new LicenseExpiredViewModel
var model = new LicenseExpiredViewModel();
if (organizationName != null)
{
OrganizationName = CoreHelpers.SanitizeForEmail(organizationName, false),
};
model.OrganizationName = CoreHelpers.SanitizeForEmail(organizationName, false);
}
await AddMessageContentAsync(message, "LicenseExpired", model);
message.Category = "LicenseExpired";
await _mailDeliveryService.SendEmailAsync(message);