fix(security): quoted local-part email mask — strip delimiter quotes, split on last @ (DC-109) [glm-grade=A]
This commit is contained in:
@@ -242,7 +242,9 @@ describe('DC-095 round 2: adversarial judge findings', () => {
|
||||
const out = consoleOut();
|
||||
expect(out).not.toContain('john doe');
|
||||
expect(out).not.toContain('"john doe"@example.com');
|
||||
expect(out).toContain('****@example.com');
|
||||
// DC-109: delimiter quotes are syntax, not PII — strip, never re-emit.
|
||||
expect(out).toContain('jo****@example.com'); // 2 REAL local chars, canonical shape
|
||||
expect(out).not.toMatch(/["']j\*{4}/); // old bug: stray quote among the 2 chars
|
||||
});
|
||||
|
||||
test('class instance enumerable email prop masked, prototype preserved', () => {
|
||||
|
||||
Reference in New Issue
Block a user