From 220ca0f53d8fbc53649ca23f375d9b9523de0dff Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Thu, 18 Jun 2026 12:37:34 -0400 Subject: [PATCH] Potential fix for pull request finding 'CodeQL / Exposure of private information' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .../Services/DevEmailService.cs | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/api/src/ProposalSystem.Api/Services/DevEmailService.cs b/api/src/ProposalSystem.Api/Services/DevEmailService.cs index 2eadb9a..7507b65 100644 --- a/api/src/ProposalSystem.Api/Services/DevEmailService.cs +++ b/api/src/ProposalSystem.Api/Services/DevEmailService.cs @@ -18,26 +18,9 @@ public class DevEmailService : IEmailService string pdfUrl, CancellationToken ct = default) { - var maskedRecipient = MaskEmail(toEmail); _logger.LogInformation( - "Dev mode - skipping email delivery: proposal {ProposalNumber} to {Recipient}, PDF link: {PdfUrl}", - proposalNumber, maskedRecipient, pdfUrl); + "Dev mode - skipping email delivery: proposal {ProposalNumber}, PDF link: {PdfUrl}", + proposalNumber, pdfUrl); return Task.CompletedTask; } - - private static string MaskEmail(string email) - { - if (string.IsNullOrWhiteSpace(email)) - { - return "[redacted]"; - } - - var atIndex = email.IndexOf('@'); - if (atIndex <= 1) - { - return "[redacted]"; - } - - return $"{email[0]}***{email.Substring(atIndex)}"; - } }