Passive UUID support

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
Ken Powers 2020-03-05 13:14:58 -08:00 committed by Scott Nonnenberg
parent f64ca0ed21
commit a90246cbe5
49 changed files with 2226 additions and 776 deletions

View file

@ -21,6 +21,20 @@ describe('Privacy', () => {
});
});
describe('redactUuids', () => {
it('should redact all uuids', () => {
const text =
'This is a log line with a uuid 9e420799-acdf-4bf4-8dee-353d7e2096b4\n' +
'and another one IN ALL UPPERCASE 340727FB-E43A-413B-941B-AADA033B6CA3';
const actual = Privacy.redactUuids(text);
const expected =
'This is a log line with a uuid [REDACTED]b4\n' +
'and another one IN ALL UPPERCASE [REDACTED]A3';
assert.equal(actual, expected);
});
});
describe('redactGroupIds', () => {
it('should redact all group IDs', () => {
const text =