"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/modules/privacy_test.js" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

privacy_test.js  (Signal-Desktop-1.35.2):privacy_test.js  (Signal-Desktop-1.36.1)
skipping to change at line 62 skipping to change at line 62
const text = const text =
'This is a log line with two group IDs: group(12345678\n9)\n' + 'This is a log line with two group IDs: group(12345678\n9)\n' +
'and group(abc\ndefghij)'; 'and group(abc\ndefghij)';
const actual = Privacy.redactGroupIds(text); const actual = Privacy.redactGroupIds(text);
const expected = const expected =
'This is a log line with two group IDs: group([REDACTED]789)\n' + 'This is a log line with two group IDs: group([REDACTED]789)\n' +
'and group([REDACTED]hij)'; 'and group([REDACTED]hij)';
assert.equal(actual, expected); assert.equal(actual, expected);
}); });
it('should remove newlines from redacted group V2 IDs', () => {
const text =
'This is a log line with three group IDs: groupv2(abcd32341a==)\n' +
'and groupv2(abcd32341ad=) and and groupv2(abcd32341ade)';
const actual = Privacy.redactGroupIds(text);
const expected =
'This is a log line with three group IDs: groupv2([REDACTED]41a==)\n' +
'and groupv2([REDACTED]1ad=) and and groupv2([REDACTED]ade)';
assert.equal(actual, expected);
});
}); });
describe('redactAll', () => { describe('redactAll', () => {
it('should redact all sensitive information', () => { it('should redact all sensitive information', () => {
const encodedAppRootPath = APP_ROOT_PATH.replace(/ /g, '%20'); const encodedAppRootPath = APP_ROOT_PATH.replace(/ /g, '%20');
const text = const text =
'This is a log line with sensitive information:\n' + 'This is a log line with sensitive information:\n' +
`path1 ${APP_ROOT_PATH}/main.js\n` + `path1 ${APP_ROOT_PATH}/main.js\n` +
'phone1 +12223334455 ipsum\n' + 'phone1 +12223334455 ipsum\n' +
'group1 group(123456789) doloret\n' + 'group1 group(123456789) doloret\n' +
 End of changes. 1 change blocks. 
0 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)