From 2682d95c5254c935d6e16856383492edbd0711d5 Mon Sep 17 00:00:00 2001 From: ychung-mot Date: Mon, 18 Nov 2024 07:48:09 -0800 Subject: [PATCH] chore: compliance order --- server/StrDss.Service/DelistingService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/StrDss.Service/DelistingService.cs b/server/StrDss.Service/DelistingService.cs index 1e916208..9cfbaaa3 100644 --- a/server/StrDss.Service/DelistingService.cs +++ b/server/StrDss.Service/DelistingService.cs @@ -1105,6 +1105,12 @@ private async Task ProcessComplianceOrderListings(ComplianceOrderDto[] listings, var commentError = false; var cc = Environment.GetEnvironmentVariable("STR_CEU_EMAIL"); + if (!Regex.IsMatch(_currentUser.EmailAddress, emailRegex.Regex)) + { + errors.AddItem("email", $"Your email address ({_currentUser.EmailAddress}) is invalid"); + return; + } + foreach (var listing in listings) { var rentalListing = await _listingRepo.GetRentalListing(listing.RentalListingId, false);