Practice ยท 4 of 4
Audit Without Leaking
CHALLENGE
Difficulty: intermediate+25 XP
AuditLog.Write(action, email) pastes the raw email into every
line โ the log file becomes a personal-data store. Write
Solution.Audit(string action, string email) returning the safe line:
``csharp
public static class Solution
{
public static string Audit(string action, string email);
}
`
Contract:
- the line is exactly "<action> email=***" โ the email never appears,
not even partially, whatever its content,
- email of null or empty produces the same email=***` (nothing to
correlate, nothing to leak),
- the action text is preserved verbatim (including spaces).
Press Submit to check your solution.
Back to lesson: Practice: Security Practice: Barriers at the Boundary