pull/1033/head
Mikunj 5 years ago
parent b38c666e95
commit 828444aadc

@ -35,7 +35,6 @@ const validatePassword = (phrase, i18n) => {
return null;
};
module.exports = {
generateHash,
matchesHash,

@ -12,7 +12,7 @@ const USER_AGENT = `Session ${VERSION}`;
exports.upload = async content => {
const signedForm = await fetch(BASE_URL, {
headers: {
'user-agent': USER_AGENT,
'user-agent': USER_AGENT,
},
});
const json = await signedForm.json();
@ -45,7 +45,7 @@ exports.upload = async content => {
const { status } = result;
if (status !== 204) {
throw new Error(`Failed to upload to S3, got status ${status}`)
throw new Error(`Failed to upload to S3, got status ${status}`);
}
return `${BASE_URL}/${fields.key}`;

@ -7,7 +7,7 @@ const { compose } = require('lodash/fp');
const { escapeRegExp } = require('lodash');
const APP_ROOT_PATH = path.join(__dirname, '..', '..', '..');
const SESSION_ID_PATTERN = /\b(05[0-9a-f]{64})\b/gi
const SESSION_ID_PATTERN = /\b(05[0-9a-f]{64})\b/gi;
const GROUP_ID_PATTERN = /(group\()([^)]+)(\))/g;
const REDACTION_PLACEHOLDER = '[REDACTED]';
@ -62,7 +62,7 @@ exports.redactSessionID = text => {
}
return text.replace(SESSION_ID_PATTERN, REDACTION_PLACEHOLDER);
}
};
// redactGroupIds :: String -> String
exports.redactGroupIds = text => {

@ -612,7 +612,6 @@ function showAbout() {
let debugLogWindow;
async function showDebugLogWindow() {
if (debugLogWindow) {
debugLogWindow.show();
return;

@ -1670,7 +1670,6 @@ body.dark-theme {
// _options
// _progress
// Not sure we need to change anything there - it's blue

@ -22,8 +22,8 @@ describe('Privacy', () => {
it('should not redact non session IDS', () => {
const text =
'This is a log line with a non-session ID sadsad0531032fc7415b7cc1b7516480ad121d391eddce3cfb2cee27dd5b215609c32827888\n' +
'and another one 766049a70e725ad02f7fe61b10e461380a4d7433f98096b3cacbf0362d5cab6234';
'This is a log line with a non-session ID sadsad0531032fc7415b7cc1b7516480ad121d391eddce3cfb2cee27dd5b215609c32827888\n' +
'and another one 766049a70e725ad02f7fe61b10e461380a4d7433f98096b3cacbf0362d5cab6234';
const actual = Privacy.redactSessionID(text);
assert.equal(actual, text);

Loading…
Cancel
Save