Apply new ESLint rules to legacy code

This commit is contained in:
Chris Svenningsen 2020-09-08 17:46:29 -07:00 committed by Scott Nonnenberg
parent 91cf075697
commit 8a2c17f65f
70 changed files with 376 additions and 516 deletions

View file

@ -37,14 +37,6 @@ const rules = {
{ overrides: { '?': 'ignore', ':': 'ignore' } }, { overrides: { '?': 'ignore', ':': 'ignore' } },
], ],
// Temporarily turned off during transition from TSLint
// JIRA: DESKTOP-623
'import/order': 'off',
'no-else-return': 'off',
'no-async-promise-executor': 'off',
'prefer-object-spread': 'off',
strict: 'off',
quotes: [ quotes: [
'error', 'error',
'single', 'single',

View file

@ -1,5 +1,4 @@
const { join } = require('path'); const { join } = require('path');
const packageJson = require('./package.json');
const importOnce = require('node-sass-import-once'); const importOnce = require('node-sass-import-once');
const rimraf = require('rimraf'); const rimraf = require('rimraf');
const mkdirp = require('mkdirp'); const mkdirp = require('mkdirp');
@ -8,6 +7,7 @@ const asar = require('asar');
const fs = require('fs'); const fs = require('fs');
const assert = require('assert'); const assert = require('assert');
const sass = require('node-sass'); const sass = require('node-sass');
const packageJson = require('./package.json');
/* eslint-disable more/no-then, no-console */ /* eslint-disable more/no-then, no-console */

View file

@ -1,6 +1,6 @@
const electron = require('electron'); const electron = require('electron');
const Attachments = require('./attachments');
const rimraf = require('rimraf'); const rimraf = require('rimraf');
const Attachments = require('./attachments');
const { ipcMain } = electron; const { ipcMain } = electron;

View file

@ -10,8 +10,8 @@ const toArrayBuffer = require('to-arraybuffer');
const { map, isArrayBuffer, isString } = require('lodash'); const { map, isArrayBuffer, isString } = require('lodash');
const normalizePath = require('normalize-path'); const normalizePath = require('normalize-path');
const sanitizeFilename = require('sanitize-filename'); const sanitizeFilename = require('sanitize-filename');
const { isPathInside } = require('../ts/util/isPathInside');
const getGuid = require('uuid/v4'); const getGuid = require('uuid/v4');
const { isPathInside } = require('../ts/util/isPathInside');
let xattr; let xattr;
try { try {

View file

@ -17,8 +17,6 @@ $('.environment').text(states.join(' - '));
// Install the 'dismiss with escape key' handler // Install the 'dismiss with escape key' handler
$(document).on('keydown', e => { $(document).on('keydown', e => {
'use strict';
if (e.keyCode === 27) { if (e.keyCode === 27) {
window.closeAbout(); window.closeAbout();
} }

View file

@ -14,8 +14,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(async function() { (async function() {
'use strict';
const eventHandlerQueue = new window.PQueue({ concurrency: 1 }); const eventHandlerQueue = new window.PQueue({ concurrency: 1 });
Whisper.deliveryReceiptQueue = new window.PQueue({ Whisper.deliveryReceiptQueue = new window.PQueue({
concurrency: 1, concurrency: 1,
@ -817,7 +815,8 @@
const target = toSearch[i]; const target = toSearch[i];
if (!unreadOnly) { if (!unreadOnly) {
return target.id; return target.id;
} else if (target.unreadCount > 0) { }
if (target.unreadCount > 0) {
return target.id; return target.id;
} }
} }

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
// Browser specific functions for Chrom* // Browser specific functions for Chrom*
window.extension = window.extension || {}; window.extension = window.extension || {};

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
window.Whisper.Database = window.Whisper.Database || {}; window.Whisper.Database = window.Whisper.Database || {};
window.Whisper.Database.id = window.Whisper.Database.id || 'signal'; window.Whisper.Database.id = window.Whisper.Database.id || 'signal';

View file

@ -2,8 +2,6 @@
/* global Whisper: false */ /* global Whisper: false */
$(document).on('keydown', e => { $(document).on('keydown', e => {
'use strict';
if (e.keyCode === 27) { if (e.keyCode === 27) {
window.closeDebugLog(); window.closeDebugLog();
} }

View file

@ -9,8 +9,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.Deletes = new (Backbone.Collection.extend({ Whisper.Deletes = new (Backbone.Collection.extend({
forMessage(message) { forMessage(message) {

View file

@ -10,8 +10,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.DeliveryReceipts = new (Backbone.Collection.extend({ Whisper.DeliveryReceipts = new (Backbone.Collection.extend({

View file

@ -9,8 +9,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
async function destroyExpiredMessages() { async function destroyExpiredMessages() {

View file

@ -6,8 +6,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
async function eraseTapToViewMessages() { async function eraseTapToViewMessages() {

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.KeyChangeListener = { Whisper.KeyChangeListener = {

View file

@ -1,7 +1,5 @@
/* global $ */ /* global $ */
$(() => { $(() => {
'use strict';
$('.message').text(window.i18n('optimizingApplication')); $('.message').text(window.i18n('optimizingApplication'));
}); });

View file

@ -1,6 +1,5 @@
/* eslint-env node */ /* eslint-env node */
/* eslint strict: ['error', 'never'] */
/* eslint-disable no-console */ /* eslint-disable no-console */
const electron = require('electron'); const electron = require('electron');

View file

@ -1,7 +1,5 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const messageLookup = Object.create(null); const messageLookup = Object.create(null);

View file

@ -8,8 +8,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.MessageRequests = new (Backbone.Collection.extend({ Whisper.MessageRequests = new (Backbone.Collection.extend({
forConversation(conversation) { forConversation(conversation) {

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
const BLOCKED_NUMBERS_ID = 'blocked'; const BLOCKED_NUMBERS_ID = 'blocked';
const BLOCKED_UUIDS_ID = 'blocked-uuids'; const BLOCKED_UUIDS_ID = 'blocked-uuids';
const BLOCKED_GROUPS_ID = 'blocked-groups'; const BLOCKED_GROUPS_ID = 'blocked-groups';

View file

@ -16,8 +16,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const SEALED_SENDER = { const SEALED_SENDER = {
@ -852,7 +850,7 @@
{ syncMessage: true } { syncMessage: true }
); );
const contactSendOptions = this.getSendOptions(); const contactSendOptions = this.getSendOptions();
const options = Object.assign({}, sendOptions, contactSendOptions); const options = { ...sendOptions, ...contactSendOptions };
const promise = textsecure.storage.protocol.loadIdentityKey(e164); const promise = textsecure.storage.protocol.loadIdentityKey(e164);
return promise.then(key => return promise.then(key =>

View file

@ -16,8 +16,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const { const {
@ -157,42 +155,50 @@
type: 'unsupportedMessage', type: 'unsupportedMessage',
data: this.getPropsForUnsupportedMessage(), data: this.getPropsForUnsupportedMessage(),
}; };
} else if (this.isMessageHistoryUnsynced()) { }
if (this.isMessageHistoryUnsynced()) {
return { return {
type: 'linkNotification', type: 'linkNotification',
data: null, data: null,
}; };
} else if (this.isExpirationTimerUpdate()) { }
if (this.isExpirationTimerUpdate()) {
return { return {
type: 'timerNotification', type: 'timerNotification',
data: this.getPropsForTimerNotification(), data: this.getPropsForTimerNotification(),
}; };
} else if (this.isKeyChange()) { }
if (this.isKeyChange()) {
return { return {
type: 'safetyNumberNotification', type: 'safetyNumberNotification',
data: this.getPropsForSafetyNumberNotification(), data: this.getPropsForSafetyNumberNotification(),
}; };
} else if (this.isVerifiedChange()) { }
if (this.isVerifiedChange()) {
return { return {
type: 'verificationNotification', type: 'verificationNotification',
data: this.getPropsForVerificationNotification(), data: this.getPropsForVerificationNotification(),
}; };
} else if (this.isGroupUpdate()) { }
if (this.isGroupUpdate()) {
return { return {
type: 'groupNotification', type: 'groupNotification',
data: this.getPropsForGroupNotification(), data: this.getPropsForGroupNotification(),
}; };
} else if (this.isEndSession()) { }
if (this.isEndSession()) {
return { return {
type: 'resetSessionNotification', type: 'resetSessionNotification',
data: this.getPropsForResetSessionNotification(), data: this.getPropsForResetSessionNotification(),
}; };
} else if (this.isCallHistory()) { }
if (this.isCallHistory()) {
return { return {
type: 'callHistory', type: 'callHistory',
data: this.getPropsForCallHistory(), data: this.getPropsForCallHistory(),
}; };
} else if (this.isProfileChange()) { }
if (this.isProfileChange()) {
return { return {
type: 'profileChange', type: 'profileChange',
data: this.getPropsForProfileChange(), data: this.getPropsForProfileChange(),
@ -421,7 +427,8 @@
...basicProps, ...basicProps,
type: 'fromSync', type: 'fromSync',
}; };
} else if (sourceId && sourceId === ourId) { }
if (sourceId && sourceId === ourId) {
return { return {
...basicProps, ...basicProps,
type: 'fromMe', type: 'fromMe',
@ -875,14 +882,13 @@
const thumbnailWithObjectUrl = const thumbnailWithObjectUrl =
!path && !objectUrl !path && !objectUrl
? null ? null
: Object.assign({}, attachment.thumbnail || {}, { : { ...(attachment.thumbnail || {}), objectUrl: path || objectUrl };
objectUrl: path || objectUrl,
});
return Object.assign({}, attachment, { return {
...attachment,
isVoiceMessage: Signal.Types.Attachment.isVoiceMessage(attachment), isVoiceMessage: Signal.Types.Attachment.isVoiceMessage(attachment),
thumbnail: thumbnailWithObjectUrl, thumbnail: thumbnailWithObjectUrl,
}); };
}, },
getNotificationData() /* : { text: string, emoji?: string } */ { getNotificationData() /* : { text: string, emoji?: string } */ {
@ -916,7 +922,8 @@
text: i18n('message--getDescription--disappearing-photo'), text: i18n('message--getDescription--disappearing-photo'),
emoji: '📷', emoji: '📷',
}; };
} else if (Attachment.isVideo(attachments)) { }
if (Attachment.isVideo(attachments)) {
return { return {
text: i18n('message--getDescription--disappearing-video'), text: i18n('message--getDescription--disappearing-video'),
emoji: '🎥', emoji: '🎥',
@ -934,7 +941,8 @@
if (groupUpdate.left === 'You') { if (groupUpdate.left === 'You') {
return { text: i18n('youLeftTheGroup') }; return { text: i18n('youLeftTheGroup') };
} else if (groupUpdate.left) { }
if (groupUpdate.left) {
return { return {
text: i18n('leftTheGroup', [ text: i18n('leftTheGroup', [
this.getNameForNumber(groupUpdate.left), this.getNameForNumber(groupUpdate.left),
@ -1015,22 +1023,26 @@
text: body || i18n('message--getNotificationText--gif'), text: body || i18n('message--getNotificationText--gif'),
emoji: '🎡', emoji: '🎡',
}; };
} else if (Attachment.isImage(attachments)) { }
if (Attachment.isImage(attachments)) {
return { return {
text: body || i18n('message--getNotificationText--photo'), text: body || i18n('message--getNotificationText--photo'),
emoji: '📷', emoji: '📷',
}; };
} else if (Attachment.isVideo(attachments)) { }
if (Attachment.isVideo(attachments)) {
return { return {
text: body || i18n('message--getNotificationText--video'), text: body || i18n('message--getNotificationText--video'),
emoji: '🎥', emoji: '🎥',
}; };
} else if (Attachment.isVoiceMessage(attachment)) { }
if (Attachment.isVoiceMessage(attachment)) {
return { return {
text: body || i18n('message--getNotificationText--voice-message'), text: body || i18n('message--getNotificationText--voice-message'),
emoji: '🎤', emoji: '🎤',
}; };
} else if (Attachment.isAudio(attachments)) { }
if (Attachment.isAudio(attachments)) {
return { return {
text: body || i18n('message--getNotificationText--audio-message'), text: body || i18n('message--getNotificationText--audio-message'),
emoji: '🔈', emoji: '🔈',
@ -2361,14 +2373,16 @@
confirm(); confirm();
return; return;
} else if (isUpdate) { }
if (isUpdate) {
window.log.warn( window.log.warn(
`handleDataMessage: Received update transcript, but no existing entry for message ${message.idForLogging()}. Dropping.` `handleDataMessage: Received update transcript, but no existing entry for message ${message.idForLogging()}. Dropping.`
); );
confirm(); confirm();
return; return;
} else if (existingMessage) { }
if (existingMessage) {
window.log.warn( window.log.warn(
`handleDataMessage: Received duplicate transcript for message ${message.idForLogging()}, but it was not an update transcript. Dropping.` `handleDataMessage: Received duplicate transcript for message ${message.idForLogging()}, but it was not an update transcript. Dropping.`
); );

View file

@ -7,17 +7,13 @@ const DEFAULT_JPEG_QUALITY = 0.85;
// Documentation for `options` (`LoadImageOptions`): // Documentation for `options` (`LoadImageOptions`):
// https://github.com/blueimp/JavaScript-Load-Image/tree/v2.18.0#options // https://github.com/blueimp/JavaScript-Load-Image/tree/v2.18.0#options
exports.autoOrientImage = (fileOrBlobOrURL, options = {}) => { exports.autoOrientImage = (fileOrBlobOrURL, options = {}) => {
const optionsWithDefaults = Object.assign( const optionsWithDefaults = {
{ type: 'image/jpeg',
type: 'image/jpeg', quality: DEFAULT_JPEG_QUALITY,
quality: DEFAULT_JPEG_QUALITY, ...options,
}, canvas: true,
options, orientation: true,
{ };
canvas: true,
orientation: true,
}
);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
loadImage( loadImage(

View file

@ -459,12 +459,7 @@ async function writeQuoteThumbnails(quotedAttachments, options) {
try { try {
await Promise.all( await Promise.all(
_.map(quotedAttachments, (attachment, index) => _.map(quotedAttachments, (attachment, index) =>
writeQuoteThumbnail( writeQuoteThumbnail(attachment, { ...options, index })
attachment,
Object.assign({}, options, {
index,
})
)
) )
); );
} catch (error) { } catch (error) {
@ -531,12 +526,7 @@ async function writeAttachments(attachments, options) {
const { name } = options; const { name } = options;
const promises = _.map(attachments, (attachment, index) => const promises = _.map(attachments, (attachment, index) =>
writeAttachment( writeAttachment(attachment, { ...options, index })
attachment,
Object.assign({}, options, {
index,
})
)
); );
try { try {
await Promise.all(promises); await Promise.all(promises);
@ -575,14 +565,7 @@ async function writeContactAvatars(contact, options) {
try { try {
await Promise.all( await Promise.all(
_.map(contact, (item, index) => _.map(contact, (item, index) => writeAvatar(item, { ...options, index }))
writeAvatar(
item,
Object.assign({}, options, {
index,
})
)
)
); );
} catch (error) { } catch (error) {
window.log.error( window.log.error(
@ -620,12 +603,7 @@ async function writePreviews(preview, options) {
try { try {
await Promise.all( await Promise.all(
_.map(preview, (item, index) => _.map(preview, (item, index) =>
writePreviewImage( writePreviewImage(item, { ...options, index })
item,
Object.assign({}, options, {
index,
})
)
) )
); );
} catch (error) { } catch (error) {
@ -1236,12 +1214,11 @@ async function exportToDirectory(directory, options) {
const attachmentsDir = await createDirectory(directory, 'attachments'); const attachmentsDir = await createDirectory(directory, 'attachments');
await exportConversationListToFile(stagingDir); await exportConversationListToFile(stagingDir);
await exportConversations( await exportConversations({
Object.assign({}, options, { ...options,
messagesDir: stagingDir, messagesDir: stagingDir,
attachmentsDir, attachmentsDir,
}) });
);
const archivePath = path.join(directory, ARCHIVE_NAME); const archivePath = path.join(directory, ARCHIVE_NAME);
await compressArchive(archivePath, stagingDir); await compressArchive(archivePath, stagingDir);
@ -1281,10 +1258,7 @@ async function importFromDirectory(directory, options) {
loadConversationLookup(), loadConversationLookup(),
]); ]);
const [messageLookup, conversationLookup] = lookups; const [messageLookup, conversationLookup] = lookups;
options = Object.assign({}, options, { options = { ...options, messageLookup, conversationLookup };
messageLookup,
conversationLookup,
});
const archivePath = path.join(directory, ARCHIVE_NAME); const archivePath = path.join(directory, ARCHIVE_NAME);
if (fs.existsSync(archivePath)) { if (fs.existsSync(archivePath)) {
@ -1312,11 +1286,9 @@ async function importFromDirectory(directory, options) {
await decryptFile(archivePath, decryptedArchivePath, options); await decryptFile(archivePath, decryptedArchivePath, options);
await decompressArchive(decryptedArchivePath, stagingDir); await decompressArchive(decryptedArchivePath, stagingDir);
options = Object.assign({}, options, { options = { ...options, attachmentsDir };
attachmentsDir,
});
const result = await importNonMessages(stagingDir, options); const result = await importNonMessages(stagingDir, options);
await importConversations(stagingDir, Object.assign({}, options)); await importConversations(stagingDir, { ...options });
window.log.info('Done importing from backup!'); window.log.info('Done importing from backup!');
return result; return result;

View file

@ -111,20 +111,22 @@ const createRandomMessage = async ({ conversationId } = {}) => {
const _createMessage = ({ commonProperties, conversationId, type } = {}) => { const _createMessage = ({ commonProperties, conversationId, type } = {}) => {
switch (type) { switch (type) {
case 'incoming': case 'incoming':
return Object.assign({}, commonProperties, { return {
...commonProperties,
flags: 0, flags: 0,
source: conversationId, source: conversationId,
sourceDevice: 1, sourceDevice: 1,
}); };
case 'outgoing': case 'outgoing':
return Object.assign({}, commonProperties, { return {
...commonProperties,
delivered: 1, delivered: 1,
delivered_to: [conversationId], delivered_to: [conversationId],
expireTimer: 0, expireTimer: 0,
recipients: [conversationId], recipients: [conversationId],
sent_to: [conversationId], sent_to: [conversationId],
synced: true, synced: true,
}); };
default: default:
throw new TypeError(`Unknown message type: '${type}'`); throw new TypeError(`Unknown message type: '${type}'`);
} }

View file

@ -34,7 +34,8 @@ exports.setup = (locale, messages) => {
const { message } = entry; const { message } = entry;
if (!substitutions) { if (!substitutions) {
return message; return message;
} else if (Array.isArray(substitutions)) { }
if (Array.isArray(substitutions)) {
return substitutions.reduce( return substitutions.reduce(
(result, substitution) => result.replace(/\$.+?\$/, substitution), (result, substitution) => result.replace(/\$.+?\$/, substitution),
message message

View file

@ -175,15 +175,20 @@ const KB = 1024;
function getChunkPattern(size, initialOffset) { function getChunkPattern(size, initialOffset) {
if (size > MB) { if (size > MB) {
return _getRequestPattern(size, MB, initialOffset); return _getRequestPattern(size, MB, initialOffset);
} else if (size > 500 * KB) { }
if (size > 500 * KB) {
return _getRequestPattern(size, 500 * KB, initialOffset); return _getRequestPattern(size, 500 * KB, initialOffset);
} else if (size > 100 * KB) { }
if (size > 100 * KB) {
return _getRequestPattern(size, 100 * KB, initialOffset); return _getRequestPattern(size, 100 * KB, initialOffset);
} else if (size > 50 * KB) { }
if (size > 50 * KB) {
return _getRequestPattern(size, 50 * KB, initialOffset); return _getRequestPattern(size, 50 * KB, initialOffset);
} else if (size > 10 * KB) { }
if (size > 10 * KB) {
return _getRequestPattern(size, 10 * KB, initialOffset); return _getRequestPattern(size, 10 * KB, initialOffset);
} else if (size > KB) { }
if (size > KB) {
return _getRequestPattern(size, KB, initialOffset); return _getRequestPattern(size, KB, initialOffset);
} }

View file

@ -1,14 +1,14 @@
const is = require('@sindresorhus/is'); const is = require('@sindresorhus/is');
const AttachmentTS = require('../../../ts/types/Attachment');
const GoogleChrome = require('../../../ts/util/GoogleChrome');
const MIME = require('../../../ts/types/MIME');
const { toLogFormat } = require('./errors');
const { const {
arrayBufferToBlob, arrayBufferToBlob,
blobToArrayBuffer, blobToArrayBuffer,
dataURLToBlob, dataURLToBlob,
} = require('blob-util'); } = require('blob-util');
const AttachmentTS = require('../../../ts/types/Attachment');
const GoogleChrome = require('../../../ts/util/GoogleChrome');
const MIME = require('../../../ts/types/MIME');
const { toLogFormat } = require('./errors');
const { autoOrientImage } = require('../auto_orient_image'); const { autoOrientImage } = require('../auto_orient_image');
const { const {
migrateDataToFileSystem, migrateDataToFileSystem,
@ -73,10 +73,11 @@ exports.autoOrientJPEG = async attachment => {
// retain it but due to reports of data loss, we dont want to overburden IndexedDB // retain it but due to reports of data loss, we dont want to overburden IndexedDB
// by potentially doubling stored image data. // by potentially doubling stored image data.
// See: https://github.com/signalapp/Signal-Desktop/issues/1589 // See: https://github.com/signalapp/Signal-Desktop/issues/1589
const newAttachment = Object.assign({}, attachment, { const newAttachment = {
...attachment,
data: newDataArrayBuffer, data: newDataArrayBuffer,
size: newDataArrayBuffer.byteLength, size: newDataArrayBuffer.byteLength,
}); };
// `digest` is no longer valid for auto-oriented image data, so we discard it: // `digest` is no longer valid for auto-oriented image data, so we discard it:
delete newAttachment.digest; delete newAttachment.digest;
@ -103,9 +104,7 @@ exports._replaceUnicodeOrderOverridesSync = attachment => {
INVALID_CHARACTERS_PATTERN, INVALID_CHARACTERS_PATTERN,
UNICODE_REPLACEMENT_CHARACTER UNICODE_REPLACEMENT_CHARACTER
); );
const newAttachment = Object.assign({}, attachment, { const newAttachment = { ...attachment, fileName: normalizedFilename };
fileName: normalizedFilename,
});
return newAttachment; return newAttachment;
}; };
@ -145,7 +144,7 @@ exports.removeSchemaVersion = ({ attachment, logger }) => {
return attachment; return attachment;
} }
const attachmentWithoutSchemaVersion = Object.assign({}, attachment); const attachmentWithoutSchemaVersion = { ...attachment };
delete attachmentWithoutSchemaVersion.schemaVersion; delete attachmentWithoutSchemaVersion.schemaVersion;
return attachmentWithoutSchemaVersion; return attachmentWithoutSchemaVersion;
}; };
@ -179,7 +178,7 @@ exports.loadData = readAttachmentData => {
} }
const data = await readAttachmentData(attachment.path); const data = await readAttachmentData(attachment.path);
return Object.assign({}, attachment, { data, size: data.byteLength }); return { ...attachment, data, size: data.byteLength };
}; };
}; };

View file

@ -32,8 +32,6 @@ exports.migrateDataToFileSystem = async (
const path = await writeNewAttachmentData(data); const path = await writeNewAttachmentData(data);
const attachmentWithoutData = omit(Object.assign({}, attachment, { path }), [ const attachmentWithoutData = omit({ ...attachment, path }, ['data']);
'data',
]);
return attachmentWithoutData; return attachmentWithoutData;
}; };

View file

@ -17,15 +17,17 @@ exports.parseAndWriteAvatar = upgradeAttachment => async (
const { avatar } = contact; const { avatar } = contact;
// This is to ensure that an omit() call doesn't pull in prototype props/methods // This is to ensure that an omit() call doesn't pull in prototype props/methods
const contactShallowCopy = Object.assign({}, contact); const contactShallowCopy = { ...contact };
const contactWithUpdatedAvatar = const contactWithUpdatedAvatar =
avatar && avatar.avatar avatar && avatar.avatar
? Object.assign({}, contactShallowCopy, { ? {
avatar: Object.assign({}, avatar, { ...contactShallowCopy,
avatar: {
...avatar,
avatar: await upgradeAttachment(avatar.avatar, context), avatar: await upgradeAttachment(avatar.avatar, context),
}), },
}) }
: omit(contactShallowCopy, ['avatar']); : omit(contactShallowCopy, ['avatar']);
// eliminates empty numbers, emails, and addresses; adds type if not provided // eliminates empty numbers, emails, and addresses; adds type if not provided
@ -50,14 +52,13 @@ function parseContact(contact, options = {}) {
const boundParsePhone = phoneNumber => const boundParsePhone = phoneNumber =>
parsePhoneItem(phoneNumber, { regionCode }); parsePhoneItem(phoneNumber, { regionCode });
return Object.assign( return {
{}, ...omit(contact, ['avatar', 'number', 'email', 'address']),
omit(contact, ['avatar', 'number', 'email', 'address']), ...parseAvatar(contact.avatar),
parseAvatar(contact.avatar), ...createArrayKey('number', compact(map(contact.number, boundParsePhone))),
createArrayKey('number', compact(map(contact.number, boundParsePhone))), ...createArrayKey('email', compact(map(contact.email, parseEmailItem))),
createArrayKey('email', compact(map(contact.email, parseEmailItem))), ...createArrayKey('address', compact(map(contact.address, parseAddress))),
createArrayKey('address', compact(map(contact.address, parseAddress))) };
);
} }
function idForLogging(message) { function idForLogging(message) {
@ -94,10 +95,11 @@ function parsePhoneItem(item, options = {}) {
return null; return null;
} }
return Object.assign({}, item, { return {
...item,
type: item.type || DEFAULT_PHONE_TYPE, type: item.type || DEFAULT_PHONE_TYPE,
value: parsePhoneNumber(item.value, { regionCode }), value: parsePhoneNumber(item.value, { regionCode }),
}); };
} }
function parseEmailItem(item) { function parseEmailItem(item) {
@ -105,9 +107,7 @@ function parseEmailItem(item) {
return null; return null;
} }
return Object.assign({}, item, { return { ...item, type: item.type || DEFAULT_EMAIL_TYPE };
type: item.type || DEFAULT_EMAIL_TYPE,
});
} }
function parseAddress(address) { function parseAddress(address) {
@ -127,9 +127,7 @@ function parseAddress(address) {
return null; return null;
} }
return Object.assign({}, address, { return { ...address, type: address.type || DEFAULT_ADDRESS_TYPE };
type: address.type || DEFAULT_ADDRESS_TYPE,
});
} }
function parseAvatar(avatar) { function parseAvatar(avatar) {
@ -138,9 +136,7 @@ function parseAvatar(avatar) {
} }
return { return {
avatar: Object.assign({}, avatar, { avatar: { ...avatar, isProfile: avatar.isProfile || false },
isProfile: avatar.isProfile || false,
}),
}; };
} }

View file

@ -72,9 +72,7 @@ exports.initializeSchemaVersion = ({ message, logger }) => {
: 0; : 0;
const hasAttachments = numAttachments > 0; const hasAttachments = numAttachments > 0;
if (!hasAttachments) { if (!hasAttachments) {
return Object.assign({}, message, { return { ...message, schemaVersion: INITIAL_SCHEMA_VERSION };
schemaVersion: INITIAL_SCHEMA_VERSION,
});
} }
// All attachments should have the same schema version, so we just pick // All attachments should have the same schema version, so we just pick
@ -85,12 +83,13 @@ exports.initializeSchemaVersion = ({ message, logger }) => {
) )
? firstAttachment.schemaVersion ? firstAttachment.schemaVersion
: INITIAL_SCHEMA_VERSION; : INITIAL_SCHEMA_VERSION;
const messageWithInitialSchema = Object.assign({}, message, { const messageWithInitialSchema = {
...message,
schemaVersion: inheritedSchemaVersion, schemaVersion: inheritedSchemaVersion,
attachments: message.attachments.map(attachment => attachments: message.attachments.map(attachment =>
Attachment.removeSchemaVersion({ attachment, logger }) Attachment.removeSchemaVersion({ attachment, logger })
), ),
}); };
return messageWithInitialSchema; return messageWithInitialSchema;
}; };
@ -158,7 +157,7 @@ exports._withSchemaVersion = ({ schemaVersion, upgrade }) => {
return message; return message;
} }
return Object.assign({}, upgradedMessage, { schemaVersion }); return { ...upgradedMessage, schemaVersion };
}; };
}; };
@ -172,7 +171,7 @@ exports._mapAttachments = upgradeAttachment => async (message, context) => {
const attachments = await Promise.all( const attachments = await Promise.all(
(message.attachments || []).map(upgradeWithContext) (message.attachments || []).map(upgradeWithContext)
); );
return Object.assign({}, message, { attachments }); return { ...message, attachments };
}; };
// Public API // Public API
@ -180,13 +179,13 @@ exports._mapAttachments = upgradeAttachment => async (message, context) => {
// (Message, Context) -> // (Message, Context) ->
// Promise Message // Promise Message
exports._mapContact = upgradeContact => async (message, context) => { exports._mapContact = upgradeContact => async (message, context) => {
const contextWithMessage = Object.assign({}, context, { message }); const contextWithMessage = { ...context, message };
const upgradeWithContext = contact => const upgradeWithContext = contact =>
upgradeContact(contact, contextWithMessage); upgradeContact(contact, contextWithMessage);
const contact = await Promise.all( const contact = await Promise.all(
(message.contact || []).map(upgradeWithContext) (message.contact || []).map(upgradeWithContext)
); );
return Object.assign({}, message, { contact }); return { ...message, contact };
}; };
// _mapQuotedAttachments :: (QuotedAttachment -> Promise QuotedAttachment) -> // _mapQuotedAttachments :: (QuotedAttachment -> Promise QuotedAttachment) ->
@ -210,9 +209,7 @@ exports._mapQuotedAttachments = upgradeAttachment => async (
} }
const upgradedThumbnail = await upgradeAttachment(thumbnail, context); const upgradedThumbnail = await upgradeAttachment(thumbnail, context);
return Object.assign({}, attachment, { return { ...attachment, thumbnail: upgradedThumbnail };
thumbnail: upgradedThumbnail,
});
}; };
const quotedAttachments = (message.quote && message.quote.attachments) || []; const quotedAttachments = (message.quote && message.quote.attachments) || [];
@ -220,11 +217,7 @@ exports._mapQuotedAttachments = upgradeAttachment => async (
const attachments = await Promise.all( const attachments = await Promise.all(
quotedAttachments.map(upgradeWithContext) quotedAttachments.map(upgradeWithContext)
); );
return Object.assign({}, message, { return { ...message, quote: { ...message.quote, attachments } };
quote: Object.assign({}, message.quote, {
attachments,
}),
});
}; };
// _mapPreviewAttachments :: (PreviewAttachment -> Promise PreviewAttachment) -> // _mapPreviewAttachments :: (PreviewAttachment -> Promise PreviewAttachment) ->
@ -248,17 +241,13 @@ exports._mapPreviewAttachments = upgradeAttachment => async (
} }
const upgradedImage = await upgradeAttachment(image, context); const upgradedImage = await upgradeAttachment(image, context);
return Object.assign({}, preview, { return { ...preview, image: upgradedImage };
image: upgradedImage,
});
}; };
const preview = await Promise.all( const preview = await Promise.all(
(message.preview || []).map(upgradeWithContext) (message.preview || []).map(upgradeWithContext)
); );
return Object.assign({}, message, { return { ...message, preview };
preview,
});
}; };
const toVersion0 = async (message, context) => const toVersion0 = async (message, context) =>
@ -533,12 +522,10 @@ exports.createAttachmentLoader = loadAttachmentData => {
); );
} }
return async message => return async message => ({
Object.assign({}, message, { ...message,
attachments: await Promise.all( attachments: await Promise.all(message.attachments.map(loadAttachmentData)),
message.attachments.map(loadAttachmentData) });
),
});
}; };
exports.loadQuoteData = loadAttachmentData => { exports.loadQuoteData = loadAttachmentData => {
@ -767,11 +754,10 @@ exports.createAttachmentDataWriter = ({
await writeExistingAttachmentData(avatar.avatar); await writeExistingAttachmentData(avatar.avatar);
return Object.assign({}, messageContact, { return {
avatar: Object.assign({}, avatar, { ...messageContact,
avatar: omit(avatar.avatar, ['data']), avatar: { ...avatar, avatar: omit(avatar.avatar, ['data']) },
}), };
});
}; };
const writePreviewImage = async item => { const writePreviewImage = async item => {
@ -782,41 +768,36 @@ exports.createAttachmentDataWriter = ({
await writeExistingAttachmentData(image); await writeExistingAttachmentData(image);
return Object.assign({}, item, { return { ...item, image: omit(image, ['data']) };
image: omit(image, ['data']),
});
}; };
const messageWithoutAttachmentData = Object.assign( const messageWithoutAttachmentData = {
{}, ...(await writeThumbnails(message, { logger })),
await writeThumbnails(message, { logger }), contact: await Promise.all((contact || []).map(writeContactAvatar)),
{ preview: await Promise.all((preview || []).map(writePreviewImage)),
contact: await Promise.all((contact || []).map(writeContactAvatar)), attachments: await Promise.all(
preview: await Promise.all((preview || []).map(writePreviewImage)), (attachments || []).map(async attachment => {
attachments: await Promise.all( await writeExistingAttachmentData(attachment);
(attachments || []).map(async attachment => {
await writeExistingAttachmentData(attachment);
if (attachment.screenshot && attachment.screenshot.data) { if (attachment.screenshot && attachment.screenshot.data) {
await writeExistingAttachmentData(attachment.screenshot); await writeExistingAttachmentData(attachment.screenshot);
} }
if (attachment.thumbnail && attachment.thumbnail.data) { if (attachment.thumbnail && attachment.thumbnail.data) {
await writeExistingAttachmentData(attachment.thumbnail); await writeExistingAttachmentData(attachment.thumbnail);
} }
return { return {
...omit(attachment, ['data']), ...omit(attachment, ['data']),
...(attachment.thumbnail ...(attachment.thumbnail
? { thumbnail: omit(attachment.thumbnail, ['data']) } ? { thumbnail: omit(attachment.thumbnail, ['data']) }
: null), : null),
...(attachment.screenshot ...(attachment.screenshot
? { screenshot: omit(attachment.screenshot, ['data']) } ? { screenshot: omit(attachment.screenshot, ['data']) }
: null), : null),
}; };
}) })
), ),
} };
);
return messageWithoutAttachmentData; return messageWithoutAttachmentData;
}; };

View file

@ -1,9 +1,9 @@
/* global document, URL, Blob */ /* global document, URL, Blob */
const loadImage = require('blueimp-load-image'); const loadImage = require('blueimp-load-image');
const { toLogFormat } = require('./errors');
const dataURLToBlobSync = require('blueimp-canvas-to-blob'); const dataURLToBlobSync = require('blueimp-canvas-to-blob');
const { blobToArrayBuffer } = require('blob-util'); const { blobToArrayBuffer } = require('blob-util');
const { toLogFormat } = require('./errors');
const { const {
arrayBufferToObjectURL, arrayBufferToObjectURL,
} = require('../../../ts/util/arrayBufferToObjectURL'); } = require('../../../ts/util/arrayBufferToObjectURL');

View file

@ -9,8 +9,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const { Settings } = Signal.Types; const { Settings } = Signal.Types;

View file

@ -1,8 +1,6 @@
/* global $, Whisper, i18n */ /* global $, Whisper, i18n */
$(document).on('keydown', e => { $(document).on('keydown', e => {
'use strict';
if (e.keyCode === 27) { if (e.keyCode === 27) {
window.closePermissionsPopup(); window.closePermissionsPopup();
} }
@ -11,8 +9,6 @@ $(document).on('keydown', e => {
const $body = $(document.body); const $body = $(document.body);
async function applyTheme() { async function applyTheme() {
'use strict';
const theme = await window.getThemeSetting(); const theme = await window.getThemeSetting();
$body.removeClass('light-theme'); $body.removeClass('light-theme');
$body.removeClass('dark-theme'); $body.removeClass('dark-theme');
@ -22,8 +18,6 @@ async function applyTheme() {
applyTheme(); applyTheme();
window.subscribeToSystemThemeChange(() => { window.subscribeToSystemThemeChange(() => {
'use strict';
applyTheme(); applyTheme();
}); });
@ -42,8 +36,6 @@ window.view = new Whisper.ConfirmationDialogView({
message, message,
okText: i18n('allowAccess'), okText: i18n('allowAccess'),
resolve: () => { resolve: () => {
'use strict';
if (!window.forCamera) { if (!window.forCamera) {
window.setMediaPermissions(true); window.setMediaPermissions(true);
} else { } else {

View file

@ -9,8 +9,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.Reactions = new (Backbone.Collection.extend({ Whisper.Reactions = new (Backbone.Collection.extend({
forMessage(message) { forMessage(message) {

View file

@ -10,8 +10,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.ReadReceipts = new (Backbone.Collection.extend({ Whisper.ReadReceipts = new (Backbone.Collection.extend({
forMessage(conversation, message) { forMessage(conversation, message) {

View file

@ -8,8 +8,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.ReadSyncs = new (Backbone.Collection.extend({ Whisper.ReadSyncs = new (Backbone.Collection.extend({
forMessage(message) { forMessage(message) {

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const ROTATION_INTERVAL = 48 * 60 * 60 * 1000; const ROTATION_INTERVAL = 48 * 60 * 60 * 1000;
let timeout; let timeout;

View file

@ -1,8 +1,6 @@
/* global $, Whisper */ /* global $, Whisper */
$(document).on('keydown', e => { $(document).on('keydown', e => {
'use strict';
if (e.keyCode === 27) { if (e.keyCode === 27) {
window.closeSettings(); window.closeSettings();
} }
@ -11,8 +9,6 @@ $(document).on('keydown', e => {
const $body = $(document.body); const $body = $(document.body);
async function applyTheme() { async function applyTheme() {
'use strict';
const theme = await window.getThemeSetting(); const theme = await window.getThemeSetting();
$body.removeClass('light-theme'); $body.removeClass('light-theme');
$body.removeClass('dark-theme'); $body.removeClass('dark-theme');
@ -22,12 +18,9 @@ async function applyTheme() {
applyTheme(); applyTheme();
window.subscribeToSystemThemeChange(() => { window.subscribeToSystemThemeChange(() => {
'use strict';
applyTheme(); applyTheme();
}); });
// eslint-disable-next-line strict
const getInitialData = async () => ({ const getInitialData = async () => ({
deviceName: await window.getDeviceName(), deviceName: await window.getDeviceName(),
@ -57,15 +50,11 @@ window.initialRequest = getInitialData();
// eslint-disable-next-line more/no-then // eslint-disable-next-line more/no-then
window.initialRequest.then( window.initialRequest.then(
data => { data => {
'use strict';
window.initialData = data; window.initialData = data;
window.view = new Whisper.SettingsView(); window.view = new Whisper.SettingsView();
window.view.$el.appendTo($body); window.view.$el.appendTo($body);
}, },
error => { error => {
'use strict';
window.log.error( window.log.error(
'settings.initialRequest error:', 'settings.initialRequest error:',
error && error.stack ? error.stack : error error && error.stack ? error.stack : error

View file

@ -5,8 +5,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
const TIMESTAMP_THRESHOLD = 5 * 1000; // 5 seconds const TIMESTAMP_THRESHOLD = 5 * 1000; // 5 seconds
const Direction = { const Direction = {
SENDING: 1, SENDING: 1,
@ -635,7 +633,8 @@
await this.archiveSiblingSessions(encodedAddress); await this.archiveSiblingSessions(encodedAddress);
return true; return true;
} else if (this.isNonBlockingApprovalRequired(identityRecord)) { }
if (this.isNonBlockingApprovalRequired(identityRecord)) {
window.log.info('Setting approval status...'); window.log.info('Setting approval status...');
identityRecord.nonblockingApproval = nonblockingApproval; identityRecord.nonblockingApproval = nonblockingApproval;

View file

@ -3,8 +3,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
let ready = false; let ready = false;

View file

@ -8,8 +8,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.ViewSyncs = new (Backbone.Collection.extend({ Whisper.ViewSyncs = new (Backbone.Collection.extend({
forMessage(message) { forMessage(message) {

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
function resolveTheme() { function resolveTheme() {

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.BannerView = Whisper.View.extend({ Whisper.BannerView = Whisper.View.extend({

View file

@ -5,8 +5,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const { Logs } = window.Signal; const { Logs } = window.Signal;

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.ConfirmationDialogView = Whisper.View.extend({ Whisper.ConfirmationDialogView = Whisper.View.extend({

View file

@ -3,8 +3,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.ContactListView = Whisper.ListView.extend({ Whisper.ContactListView = Whisper.ListView.extend({

View file

@ -14,8 +14,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
const FIVE_MINUTES = 1000 * 60 * 5; const FIVE_MINUTES = 1000 * 60 * 5;
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
@ -2717,14 +2715,15 @@
Component: window.Signal.Components.Quote, Component: window.Signal.Components.Quote,
elCallback: el => elCallback: el =>
this.$(this.compositionApi.current.attSlotRef.current).prepend(el), this.$(this.compositionApi.current.attSlotRef.current).prepend(el),
props: Object.assign({}, props, { props: {
...props,
withContentAbove: true, withContentAbove: true,
onClose: () => { onClose: () => {
// This can't be the normal 'onClose' because that is always run when this // This can't be the normal 'onClose' because that is always run when this
// view is removed from the DOM, and would clear the draft quote. // view is removed from the DOM, and would clear the draft quote.
this.setQuoteMessage(null); this.setQuoteMessage(null);
}, },
}), },
}); });
}, },

View file

@ -3,8 +3,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.LinkedCopiedToast = Whisper.ToastView.extend({ Whisper.LinkedCopiedToast = Whisper.ToastView.extend({

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
// TODO: take a title string which could replace the 'members' header // TODO: take a title string which could replace the 'members' header

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
/* /*

View file

@ -7,8 +7,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.StickerPackInstallFailedToast = Whisper.ToastView.extend({ Whisper.StickerPackInstallFailedToast = Whisper.ToastView.extend({

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const Steps = { const Steps = {

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.KeyVerificationPanelView = Whisper.View.extend({ Whisper.KeyVerificationPanelView = Whisper.View.extend({

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
/* /*

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.PhoneInputView = Whisper.View.extend({ Whisper.PhoneInputView = Whisper.View.extend({

View file

@ -5,8 +5,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
window.Whisper.ReactWrapperView = Backbone.View.extend({ window.Whisper.ReactWrapperView = Backbone.View.extend({
@ -66,12 +64,13 @@
}); });
}, },
augmentProps(props) { augmentProps(props) {
return Object.assign({}, props, { return {
...props,
close: () => { close: () => {
this.remove(); this.remove();
}, },
i18n, i18n,
}); };
}, },
remove() { remove() {
if (this.onClose) { if (this.onClose) {

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.RecorderView = Whisper.View.extend({ Whisper.RecorderView = Whisper.View.extend({

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.SafetyNumberChangeDialogView = Whisper.View.extend({ Whisper.SafetyNumberChangeDialogView = Whisper.View.extend({

View file

@ -6,8 +6,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const { Settings } = window.Signal.Types; const { Settings } = window.Signal.Types;

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.StandaloneRegistrationView = Whisper.View.extend({ Whisper.StandaloneRegistrationView = Whisper.View.extend({

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.ToastView = Whisper.View.extend({ Whisper.ToastView = Whisper.View.extend({

View file

@ -22,8 +22,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.View = Backbone.View.extend( Whisper.View = Backbone.View.extend(

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
let lastTime; let lastTime;

47
main.js
View file

@ -275,31 +275,29 @@ if (OS === 'win32') {
async function createWindow() { async function createWindow() {
const { screen } = electron; const { screen } = electron;
const windowOptions = Object.assign( const windowOptions = {
{ show: !startInTray, // allow to start minimised in tray
show: !startInTray, // allow to start minimised in tray width: DEFAULT_WIDTH,
width: DEFAULT_WIDTH, height: DEFAULT_HEIGHT,
height: DEFAULT_HEIGHT, minWidth: MIN_WIDTH,
minWidth: MIN_WIDTH, minHeight: MIN_HEIGHT,
minHeight: MIN_HEIGHT, autoHideMenuBar: false,
autoHideMenuBar: false, backgroundColor:
backgroundColor: config.environment === 'test' || config.environment === 'test-lib'
config.environment === 'test' || config.environment === 'test-lib' ? '#ffffff' // Tests should always be rendered on a white background
? '#ffffff' // Tests should always be rendered on a white background : '#3a76f0',
: '#3a76f0', webPreferences: {
webPreferences: { nodeIntegration: false,
nodeIntegration: false, nodeIntegrationInWorker: false,
nodeIntegrationInWorker: false, contextIsolation: false,
contextIsolation: false, preload: path.join(__dirname, 'preload.js'),
preload: path.join(__dirname, 'preload.js'), nativeWindowOpen: true,
nativeWindowOpen: true, spellcheck: await getSpellCheckSetting(),
spellcheck: await getSpellCheckSetting(), backgroundThrottling: false,
backgroundThrottling: false,
},
icon: windowIcon,
}, },
_.pick(windowConfig, ['autoHideMenuBar', 'width', 'height', 'x', 'y']) icon: windowIcon,
); ..._.pick(windowConfig, ['autoHideMenuBar', 'width', 'height', 'x', 'y']),
};
if (!_.isNumber(windowOptions.width) || windowOptions.width < MIN_WIDTH) { if (!_.isNumber(windowOptions.width) || windowOptions.width < MIN_WIDTH) {
windowOptions.width = DEFAULT_WIDTH; windowOptions.width = DEFAULT_WIDTH;
@ -796,6 +794,7 @@ async function showDebugLogWindow() {
let permissionsPopupWindow; let permissionsPopupWindow;
function showPermissionsPopupWindow(forCalling, forCamera) { function showPermissionsPopupWindow(forCalling, forCamera) {
// eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
if (permissionsPopupWindow) { if (permissionsPopupWindow) {
permissionsPopupWindow.show(); permissionsPopupWindow.show();

View file

@ -363,21 +363,24 @@ describe('Backup', () => {
return attachment; return attachment;
} }
return Object.assign({}, attachment, { return {
...attachment,
thumbnail: await mapper(attachment.thumbnail, context), thumbnail: await mapper(attachment.thumbnail, context),
}); };
}; };
const quotedAttachments = const quotedAttachments =
(message.quote && message.quote.attachments) || []; (message.quote && message.quote.attachments) || [];
return Object.assign({}, message, { return {
quote: Object.assign({}, message.quote, { ...message,
quote: {
...message.quote,
attachments: await Promise.all( attachments: await Promise.all(
quotedAttachments.map(wrappedMapper) quotedAttachments.map(wrappedMapper)
), ),
}), },
}); };
}; };
} }
@ -391,17 +394,20 @@ describe('Backup', () => {
return wrappedLoadAttachment(thumbnail); return wrappedLoadAttachment(thumbnail);
}); });
return Object.assign({}, await loadThumbnails(message), { return {
...(await loadThumbnails(message)),
contact: await Promise.all( contact: await Promise.all(
(message.contact || []).map(async contact => { (message.contact || []).map(async contact => {
return contact && contact.avatar && contact.avatar.avatar return contact && contact.avatar && contact.avatar.avatar
? Object.assign({}, contact, { ? {
avatar: Object.assign({}, contact.avatar, { ...contact,
avatar: {
...contact.avatar,
avatar: await wrappedLoadAttachment( avatar: await wrappedLoadAttachment(
contact.avatar.avatar contact.avatar.avatar
), ),
}), },
}) }
: contact; : contact;
}) })
), ),
@ -429,7 +435,7 @@ describe('Backup', () => {
return item; return item;
}) })
), ),
}); };
} }
let backupDir; let backupDir;

View file

@ -341,13 +341,17 @@ describe('Message', () => {
schemaVersion: 1, schemaVersion: 1,
}; };
const v1 = async message => const v1 = async message => ({
Object.assign({}, message, { hasUpgradedToVersion1: true }); ...message,
hasUpgradedToVersion1: true,
});
const v2 = async () => { const v2 = async () => {
throw new Error('boom'); throw new Error('boom');
}; };
const v3 = async message => const v3 = async message => ({
Object.assign({}, message, { hasUpgradedToVersion3: true }); ...message,
hasUpgradedToVersion3: true,
});
const toVersion1 = Message._withSchemaVersion({ const toVersion1 = Message._withSchemaVersion({
schemaVersion: 1, schemaVersion: 1,
@ -399,12 +403,18 @@ describe('Message', () => {
hasUpgradedToVersion2: true, hasUpgradedToVersion2: true,
}; };
const v1 = async attachment => const v1 = async attachment => ({
Object.assign({}, attachment, { hasUpgradedToVersion1: true }); ...attachment,
const v2 = async attachment => hasUpgradedToVersion1: true,
Object.assign({}, attachment, { hasUpgradedToVersion2: true }); });
const v3 = async attachment => const v2 = async attachment => ({
Object.assign({}, attachment, { hasUpgradedToVersion3: true }); ...attachment,
hasUpgradedToVersion2: true,
});
const v3 = async attachment => ({
...attachment,
hasUpgradedToVersion3: true,
});
const toVersion1 = Message._withSchemaVersion({ const toVersion1 = Message._withSchemaVersion({
schemaVersion: 1, schemaVersion: 1,
@ -451,8 +461,7 @@ describe('Message', () => {
}); });
it('should skip upgrading if message has already been upgraded', async () => { it('should skip upgrading if message has already been upgraded', async () => {
const upgrade = async message => const upgrade = async message => ({ ...message, foo: true });
Object.assign({}, message, { foo: true });
const upgradeWithVersion = Message._withSchemaVersion({ const upgradeWithVersion = Message._withSchemaVersion({
schemaVersion: 3, schemaVersion: 3,
upgrade, upgrade,

View file

@ -2,11 +2,8 @@ import * as React from 'react';
import { storiesOf } from '@storybook/react'; import { storiesOf } from '@storybook/react';
// @ts-ignore
import { setup as setupI18n } from '../../../js/modules/i18n'; import { setup as setupI18n } from '../../../js/modules/i18n';
// @ts-ignore
import enMessages from '../../../_locales/en/messages.json'; import enMessages from '../../../_locales/en/messages.json';
import { GroupNotification, Props } from './GroupNotification'; import { GroupNotification, Props } from './GroupNotification';
const book = storiesOf('Components/Conversation', module); const book = storiesOf('Components/Conversation', module);

View file

@ -1,12 +1,10 @@
import * as React from 'react'; import * as React from 'react';
// @ts-ignore
import { setup as setupI18n } from '../../../js/modules/i18n';
// @ts-ignore
import enMessages from '../../../_locales/en/messages.json';
import { storiesOf } from '@storybook/react'; import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions'; import { action } from '@storybook/addon-actions';
import { setup as setupI18n } from '../../../js/modules/i18n';
import enMessages from '../../../_locales/en/messages.json';
import { Props as ReactionPickerProps, ReactionPicker } from './ReactionPicker'; import { Props as ReactionPickerProps, ReactionPicker } from './ReactionPicker';
import { EmojiPicker } from '../emoji/EmojiPicker'; import { EmojiPicker } from '../emoji/EmojiPicker';

View file

@ -13,6 +13,7 @@ import {
RingRTC, RingRTC,
UserId, UserId,
} from 'ringrtc'; } from 'ringrtc';
import is from '@sindresorhus/is';
import { import {
ActionsType as UxActionsType, ActionsType as UxActionsType,
@ -20,7 +21,6 @@ import {
} from '../state/ducks/calling'; } from '../state/ducks/calling';
import { CallingMessageClass, EnvelopeClass } from '../textsecure.d'; import { CallingMessageClass, EnvelopeClass } from '../textsecure.d';
import { ConversationModelType } from '../model-types.d'; import { ConversationModelType } from '../model-types.d';
import is from '@sindresorhus/is';
import { import {
AudioDevice, AudioDevice,
CallHistoryDetailsType, CallHistoryDetailsType,
@ -356,11 +356,12 @@ export class CallingClass {
// infrared if they so desire) // infrared if they so desire)
if (matchingId.length > 0) { if (matchingId.length > 0) {
return matchingId[0].deviceId; return matchingId[0].deviceId;
} else if (nonInfrared.length > 0) {
return nonInfrared[0].deviceId;
} else {
return undefined;
} }
if (nonInfrared.length > 0) {
return nonInfrared[0].deviceId;
}
return undefined;
} }
setPreferredMicrophone(device: AudioDevice): void { setPreferredMicrophone(device: AudioDevice): void {
@ -471,12 +472,12 @@ export class CallingClass {
if (microphonePermission) { if (microphonePermission) {
if (isVideoCall) { if (isVideoCall) {
return this.requestCameraPermissions(); return this.requestCameraPermissions();
} else {
return true;
} }
} else {
return false; return true;
} }
return false;
} }
private async handleOutgoingSignaling( private async handleOutgoingSignaling(

View file

@ -155,7 +155,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/about_start.js", "path": "js/about_start.js",
"line": "$('.privacy').text(window.i18n('privacyPolicy'));", "line": "$('.privacy').text(window.i18n('privacyPolicy'));",
"lineNumber": 28, "lineNumber": 26,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -173,7 +173,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/debug_log_start.js", "path": "js/debug_log_start.js",
"line": "const $body = $(document.body);", "line": "const $body = $(document.body);",
"lineNumber": 12, "lineNumber": 10,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -182,7 +182,7 @@
"rule": "jQuery-appendTo(", "rule": "jQuery-appendTo(",
"path": "js/debug_log_start.js", "path": "js/debug_log_start.js",
"line": "window.view.$el.appendTo($body);", "line": "window.view.$el.appendTo($body);",
"lineNumber": 19, "lineNumber": 17,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z", "updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -199,7 +199,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/loading_start.js", "path": "js/loading_start.js",
"line": " $('.message').text(window.i18n('optimizingApplication'));", "line": " $('.message').text(window.i18n('optimizingApplication'));",
"lineNumber": 6, "lineNumber": 4,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-25T15:45:04.024Z" "updated": "2020-03-25T15:45:04.024Z"
}, },
@ -239,7 +239,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/modules/i18n.js", "path": "js/modules/i18n.js",
"line": " const FIND_REPLACEMENTS = /\\$([^$]+)\\$/g;", "line": " const FIND_REPLACEMENTS = /\\$([^$]+)\\$/g;",
"lineNumber": 44, "lineNumber": 45,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-07-21T18:34:59.251Z" "updated": "2020-07-21T18:34:59.251Z"
}, },
@ -264,7 +264,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/permissions_popup_start.js", "path": "js/permissions_popup_start.js",
"line": "const $body = $(document.body);", "line": "const $body = $(document.body);",
"lineNumber": 11, "lineNumber": 9,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -273,7 +273,7 @@
"rule": "jQuery-appendTo(", "rule": "jQuery-appendTo(",
"path": "js/permissions_popup_start.js", "path": "js/permissions_popup_start.js",
"line": "window.view.$el.appendTo($body);", "line": "window.view.$el.appendTo($body);",
"lineNumber": 57, "lineNumber": 49,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-02T21:51:34.813Z", "updated": "2020-06-02T21:51:34.813Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -291,7 +291,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/settings_start.js", "path": "js/settings_start.js",
"line": "const $body = $(document.body);", "line": "const $body = $(document.body);",
"lineNumber": 11, "lineNumber": 9,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -300,7 +300,7 @@
"rule": "jQuery-appendTo(", "rule": "jQuery-appendTo(",
"path": "js/settings_start.js", "path": "js/settings_start.js",
"line": " window.view.$el.appendTo($body);", "line": " window.view.$el.appendTo($body);",
"lineNumber": 64, "lineNumber": 55,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -309,7 +309,7 @@
"rule": "jQuery-load(", "rule": "jQuery-load(",
"path": "js/signal_protocol_store.js", "path": "js/signal_protocol_store.js",
"line": " await ConversationController.load();", "line": " await ConversationController.load();",
"lineNumber": 981, "lineNumber": 980,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-06-12T14:20:09.936Z" "updated": "2020-06-12T14:20:09.936Z"
}, },
@ -317,7 +317,7 @@
"rule": "DOM-innerHTML", "rule": "DOM-innerHTML",
"path": "js/views/app_view.js", "path": "js/views/app_view.js",
"line": " this.el.innerHTML = '';", "line": " this.el.innerHTML = '';",
"lineNumber": 54, "lineNumber": 52,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-15T00:38:04.183Z", "updated": "2018-09-15T00:38:04.183Z",
"reasonDetail": "Hard-coded string" "reasonDetail": "Hard-coded string"
@ -326,7 +326,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/app_view.js", "path": "js/views/app_view.js",
"line": " this.el.append(view.el);", "line": " this.el.append(view.el);",
"lineNumber": 55, "lineNumber": 53,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z", "updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -335,7 +335,7 @@
"rule": "jQuery-appendTo(", "rule": "jQuery-appendTo(",
"path": "js/views/app_view.js", "path": "js/views/app_view.js",
"line": " this.debugLogView.$el.appendTo(this.el);", "line": " this.debugLogView.$el.appendTo(this.el);",
"lineNumber": 61, "lineNumber": 59,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z", "updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -344,7 +344,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/confirmation_dialog_view.js", "path": "js/views/confirmation_dialog_view.js",
"line": " setTimeout(() => this.$('.cancel').focus(), 1);", "line": " setTimeout(() => this.$('.cancel').focus(), 1);",
"lineNumber": 75, "lineNumber": 73,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-12-07T02:04:56.987Z", "updated": "2019-12-07T02:04:56.987Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -353,7 +353,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/contact_list_view.js", "path": "js/views/contact_list_view.js",
"line": " this.$el.append(this.contactView.el);", "line": " this.$el.append(this.contactView.el);",
"lineNumber": 37, "lineNumber": 35,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-07-31T00:19:18.696Z", "updated": "2019-07-31T00:19:18.696Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -362,7 +362,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/debug_log_view.js", "path": "js/views/debug_log_view.js",
"line": " this.$('textarea').val(i18n('loading'));", "line": " this.$('textarea').val(i18n('loading'));",
"lineNumber": 43, "lineNumber": 41,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z", "updated": "2020-05-01T17:11:39.527Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -371,7 +371,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/debug_log_view.js", "path": "js/views/debug_log_view.js",
"line": " this.$('textarea').val(text);", "line": " this.$('textarea').val(text);",
"lineNumber": 47, "lineNumber": 45,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z", "updated": "2020-05-01T17:11:39.527Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -380,7 +380,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/debug_log_view.js", "path": "js/views/debug_log_view.js",
"line": " const text = this.$('textarea').val();", "line": " const text = this.$('textarea').val();",
"lineNumber": 66, "lineNumber": 64,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z", "updated": "2020-05-01T17:11:39.527Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -389,7 +389,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/debug_log_view.js", "path": "js/views/debug_log_view.js",
"line": " this.$('.buttons, textarea').remove();", "line": " this.$('.buttons, textarea').remove();",
"lineNumber": 71, "lineNumber": 69,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z", "updated": "2020-05-01T17:11:39.527Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -398,6 +398,15 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/debug_log_view.js", "path": "js/views/debug_log_view.js",
"line": " el: this.$('.result'),", "line": " el: this.$('.result'),",
"lineNumber": 76,
"reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/debug_log_view.js",
"line": " this.$('.loading').removeClass('loading');",
"lineNumber": 78, "lineNumber": 78,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z", "updated": "2020-05-01T17:11:39.527Z",
@ -406,26 +415,17 @@
{ {
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/debug_log_view.js", "path": "js/views/debug_log_view.js",
"line": " this.$('.loading').removeClass('loading');", "line": " this.$('.link')",
"lineNumber": 80, "lineNumber": 80,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z", "updated": "2020-05-01T17:11:39.527Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
}, },
{
"rule": "jQuery-$(",
"path": "js/views/debug_log_view.js",
"line": " this.$('.link')",
"lineNumber": 82,
"reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z",
"reasonDetail": "Protected from arbitrary input"
},
{ {
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/debug_log_view.js", "path": "js/views/debug_log_view.js",
"line": " this.$('.loading').removeClass('loading');", "line": " this.$('.loading').removeClass('loading');",
"lineNumber": 90, "lineNumber": 88,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-01T17:11:39.527Z", "updated": "2020-05-01T17:11:39.527Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -434,7 +434,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/group_member_list_view.js", "path": "js/views/group_member_list_view.js",
"line": " this.$('.container').append(this.member_list_view.el);", "line": " this.$('.container').append(this.member_list_view.el);",
"lineNumber": 27, "lineNumber": 25,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -443,7 +443,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/group_member_list_view.js", "path": "js/views/group_member_list_view.js",
"line": " this.$('.container').append(this.member_list_view.el);", "line": " this.$('.container').append(this.member_list_view.el);",
"lineNumber": 27, "lineNumber": 25,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z", "updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -452,7 +452,7 @@
"rule": "jQuery-html(", "rule": "jQuery-html(",
"path": "js/views/identicon_svg_view.js", "path": "js/views/identicon_svg_view.js",
"line": " const html = this.render().$el.html();", "line": " const html = this.render().$el.html();",
"lineNumber": 19, "lineNumber": 17,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-15T00:38:04.183Z", "updated": "2018-09-15T00:38:04.183Z",
"reasonDetail": "Getting the value, not setting it" "reasonDetail": "Getting the value, not setting it"
@ -461,7 +461,7 @@
"rule": "jQuery-appendTo(", "rule": "jQuery-appendTo(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " view.$el.appendTo(this.el);", "line": " view.$el.appendTo(this.el);",
"lineNumber": 33, "lineNumber": 31,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-10-21T22:30:15.622Z", "updated": "2019-10-21T22:30:15.622Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -470,7 +470,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.message').text(message);", "line": " this.$('.message').text(message);",
"lineNumber": 67, "lineNumber": 65,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-10-21T22:30:15.622Z", "updated": "2019-10-21T22:30:15.622Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -479,7 +479,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " el: this.$('.conversation-stack'),", "line": " el: this.$('.conversation-stack'),",
"lineNumber": 83, "lineNumber": 81,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-10-21T22:30:15.622Z", "updated": "2019-10-21T22:30:15.622Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -488,7 +488,7 @@
"rule": "jQuery-prependTo(", "rule": "jQuery-prependTo(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.appLoadingScreen.$el.prependTo(this.el);", "line": " this.appLoadingScreen.$el.prependTo(this.el);",
"lineNumber": 97, "lineNumber": 95,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-10-21T22:30:15.622Z", "updated": "2019-10-21T22:30:15.622Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -497,7 +497,7 @@
"rule": "jQuery-appendTo(", "rule": "jQuery-appendTo(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " toast.$el.appendTo(this.$el);", "line": " toast.$el.appendTo(this.$el);",
"lineNumber": 106, "lineNumber": 104,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -506,7 +506,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);", "line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);",
"lineNumber": 128, "lineNumber": 126,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "<optional>" "reasonDetail": "<optional>"
@ -515,7 +515,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);", "line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);",
"lineNumber": 128, "lineNumber": 126,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "<optional>" "reasonDetail": "<optional>"
@ -524,7 +524,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);",
"lineNumber": 139, "lineNumber": 137,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -533,7 +533,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);",
"lineNumber": 139, "lineNumber": 137,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -542,7 +542,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " if (e && this.$(e.target).closest('.placeholder').length) {", "line": " if (e && this.$(e.target).closest('.placeholder').length) {",
"lineNumber": 192, "lineNumber": 190,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -551,7 +551,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('#header, .gutter').addClass('inactive');", "line": " this.$('#header, .gutter').addClass('inactive');",
"lineNumber": 196, "lineNumber": 194,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -560,7 +560,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.conversation-stack').addClass('inactive');", "line": " this.$('.conversation-stack').addClass('inactive');",
"lineNumber": 200, "lineNumber": 198,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -569,7 +569,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.conversation:first .menu').trigger('close');", "line": " this.$('.conversation:first .menu').trigger('close');",
"lineNumber": 202, "lineNumber": 200,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -578,7 +578,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {", "line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {",
"lineNumber": 222, "lineNumber": 220,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-29T18:29:18.234Z", "updated": "2020-05-29T18:29:18.234Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -587,7 +587,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.conversation:first .recorder').trigger('close');", "line": " this.$('.conversation:first .recorder').trigger('close');",
"lineNumber": 225, "lineNumber": 223,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-29T18:29:18.234Z", "updated": "2020-05-29T18:29:18.234Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -596,7 +596,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.$('#qr img').remove();", "line": " this.$('#qr img').remove();",
"lineNumber": 160, "lineNumber": 158,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -605,7 +605,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.$('#qr .container').show();", "line": " this.$('#qr .container').show();",
"lineNumber": 162, "lineNumber": 160,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -614,7 +614,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " if ($('#qr').length === 0) {", "line": " if ($('#qr').length === 0) {",
"lineNumber": 166, "lineNumber": 164,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -623,7 +623,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.$('#qr .container').hide();", "line": " this.$('#qr .container').hide();",
"lineNumber": 172, "lineNumber": 170,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-24T19:03:04.861Z", "updated": "2020-03-24T19:03:04.861Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -632,7 +632,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.qr = new QRCode(this.$('#qr')[0]).makeCode(url);", "line": " this.qr = new QRCode(this.$('#qr')[0]).makeCode(url);",
"lineNumber": 173, "lineNumber": 171,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-24T19:03:04.861Z", "updated": "2020-03-24T19:03:04.861Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -641,7 +641,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.$('#qr').addClass('ready');", "line": " this.$('#qr').addClass('ready');",
"lineNumber": 175, "lineNumber": 173,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-24T19:03:04.861Z", "updated": "2020-03-24T19:03:04.861Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -650,7 +650,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.$(DEVICE_NAME_SELECTOR).val(deviceName || window.getHostName());", "line": " this.$(DEVICE_NAME_SELECTOR).val(deviceName || window.getHostName());",
"lineNumber": 180, "lineNumber": 178,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-24T19:03:04.861Z", "updated": "2020-03-24T19:03:04.861Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -659,7 +659,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.$('#link-phone').submit();", "line": " this.$('#link-phone').submit();",
"lineNumber": 185, "lineNumber": 183,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-24T19:03:04.861Z", "updated": "2020-03-24T19:03:04.861Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -668,7 +668,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.$('#link-phone').submit(e => {", "line": " this.$('#link-phone').submit(e => {",
"lineNumber": 195, "lineNumber": 193,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-24T19:03:04.861Z", "updated": "2020-03-24T19:03:04.861Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -677,7 +677,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " let name = this.$(DEVICE_NAME_SELECTOR).val();", "line": " let name = this.$(DEVICE_NAME_SELECTOR).val();",
"lineNumber": 199, "lineNumber": 197,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-24T19:03:04.861Z", "updated": "2020-03-24T19:03:04.861Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -686,7 +686,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/install_view.js", "path": "js/views/install_view.js",
"line": " this.$(DEVICE_NAME_SELECTOR).focus();", "line": " this.$(DEVICE_NAME_SELECTOR).focus();",
"lineNumber": 202, "lineNumber": 200,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-03-24T19:03:04.861Z", "updated": "2020-03-24T19:03:04.861Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -695,7 +695,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/key_verification_view.js", "path": "js/views/key_verification_view.js",
"line": " this.$('.key-verification-wrapper').append(this.view.el);", "line": " this.$('.key-verification-wrapper').append(this.view.el);",
"lineNumber": 28, "lineNumber": 26,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-23T06:48:06.829Z" "updated": "2020-06-23T06:48:06.829Z"
}, },
@ -703,7 +703,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/key_verification_view.js", "path": "js/views/key_verification_view.js",
"line": " this.$('.key-verification-wrapper').append(this.view.el);", "line": " this.$('.key-verification-wrapper').append(this.view.el);",
"lineNumber": 28, "lineNumber": 26,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-23T06:48:06.829Z" "updated": "2020-06-23T06:48:06.829Z"
}, },
@ -711,7 +711,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/list_view.js", "path": "js/views/list_view.js",
"line": " this.$el.append(view.render().el);", "line": " this.$el.append(view.render().el);",
"lineNumber": 27, "lineNumber": 25,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z", "updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -720,7 +720,7 @@
"rule": "jQuery-html(", "rule": "jQuery-html(",
"path": "js/views/list_view.js", "path": "js/views/list_view.js",
"line": " this.$el.html('');", "line": " this.$el.html('');",
"lineNumber": 33, "lineNumber": 31,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-15T00:38:04.183Z", "updated": "2018-09-15T00:38:04.183Z",
"reasonDetail": "Hard-coded value" "reasonDetail": "Hard-coded value"
@ -729,7 +729,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/phone-input-view.js", "path": "js/views/phone-input-view.js",
"line": " this.$('input.number').intlTelInput();", "line": " this.$('input.number').intlTelInput();",
"lineNumber": 14, "lineNumber": 12,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -738,7 +738,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/phone-input-view.js", "path": "js/views/phone-input-view.js",
"line": " const input = this.$('input.number');", "line": " const input = this.$('input.number');",
"lineNumber": 21, "lineNumber": 19,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -747,7 +747,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/phone-input-view.js", "path": "js/views/phone-input-view.js",
"line": " const regionCode = this.$('li.active')", "line": " const regionCode = this.$('li.active')",
"lineNumber": 22, "lineNumber": 20,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -756,7 +756,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/phone-input-view.js", "path": "js/views/phone-input-view.js",
"line": " this.$('.number-container').removeClass('invalid');", "line": " this.$('.number-container').removeClass('invalid');",
"lineNumber": 29, "lineNumber": 27,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -765,7 +765,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/phone-input-view.js", "path": "js/views/phone-input-view.js",
"line": " this.$('.number-container').removeClass('valid');", "line": " this.$('.number-container').removeClass('valid');",
"lineNumber": 32, "lineNumber": 30,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -774,7 +774,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/recorder_view.js", "path": "js/views/recorder_view.js",
"line": " $(window).on('blur', this.onSwitchAwayBound);", "line": " $(window).on('blur', this.onSwitchAwayBound);",
"lineNumber": 19, "lineNumber": 17,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-10-11T19:22:47.331Z", "updated": "2018-10-11T19:22:47.331Z",
"reasonDetail": "Operating on already-existing DOM elements" "reasonDetail": "Operating on already-existing DOM elements"
@ -783,7 +783,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/recorder_view.js", "path": "js/views/recorder_view.js",
"line": " this.$('.time').text(`${minutes}:${seconds}`);", "line": " this.$('.time').text(`${minutes}:${seconds}`);",
"lineNumber": 51, "lineNumber": 49,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -792,7 +792,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/recorder_view.js", "path": "js/views/recorder_view.js",
"line": " $(window).off('blur', this.onSwitchAwayBound);", "line": " $(window).off('blur', this.onSwitchAwayBound);",
"lineNumber": 82, "lineNumber": 80,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-10-11T19:22:47.331Z", "updated": "2018-10-11T19:22:47.331Z",
"reasonDetail": "Operating on already-existing DOM elements" "reasonDetail": "Operating on already-existing DOM elements"
@ -801,7 +801,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/safety_number_change_dialog_view.js", "path": "js/views/safety_number_change_dialog_view.js",
"line": " this.$('.safety-number-change-dialog-wrapper').append(dialog.el);", "line": " this.$('.safety-number-change-dialog-wrapper').append(dialog.el);",
"lineNumber": 37, "lineNumber": 35,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-23T06:48:06.829Z" "updated": "2020-06-23T06:48:06.829Z"
}, },
@ -809,7 +809,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/safety_number_change_dialog_view.js", "path": "js/views/safety_number_change_dialog_view.js",
"line": " this.$('.safety-number-change-dialog-wrapper').append(dialog.el);", "line": " this.$('.safety-number-change-dialog-wrapper').append(dialog.el);",
"lineNumber": 37, "lineNumber": 35,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-23T06:48:06.829Z" "updated": "2020-06-23T06:48:06.829Z"
}, },
@ -817,7 +817,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('input').prop('checked', !!this.value);", "line": " this.$('input').prop('checked', !!this.value);",
"lineNumber": 30, "lineNumber": 28,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -826,7 +826,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('input').prop('checked', Boolean(this.value));", "line": " this.$('input').prop('checked', Boolean(this.value));",
"lineNumber": 49, "lineNumber": 47,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-02T22:20:33.618Z" "updated": "2020-06-02T22:20:33.618Z"
}, },
@ -834,7 +834,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('input').prop('checked', Boolean(this.value));", "line": " this.$('input').prop('checked', Boolean(this.value));",
"lineNumber": 68, "lineNumber": 66,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-02T21:51:34.813Z", "updated": "2020-06-02T21:51:34.813Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -843,7 +843,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " const value = this.$(e.target).val();", "line": " const value = this.$(e.target).val();",
"lineNumber": 83, "lineNumber": 81,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-02T21:51:34.813Z", "updated": "2020-06-02T21:51:34.813Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -852,7 +852,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$(`#${this.name}-${this.value}`).attr('checked', 'checked');", "line": " this.$(`#${this.name}-${this.value}`).attr('checked', 'checked');",
"lineNumber": 88, "lineNumber": 86,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-02T21:51:34.813Z", "updated": "2020-06-02T21:51:34.813Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -861,7 +861,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.notification-settings'),", "line": " el: this.$('.notification-settings'),",
"lineNumber": 97, "lineNumber": 95,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-02T21:51:34.813Z", "updated": "2020-06-02T21:51:34.813Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -870,7 +870,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.theme-settings'),", "line": " el: this.$('.theme-settings'),",
"lineNumber": 103, "lineNumber": 101,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-02T21:51:34.813Z", "updated": "2020-06-02T21:51:34.813Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -879,7 +879,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " $(document.body)", "line": " $(document.body)",
"lineNumber": 107, "lineNumber": 105,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-06-02T21:51:34.813Z", "updated": "2020-06-02T21:51:34.813Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -888,7 +888,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.draw-attention-setting'),", "line": " el: this.$('.draw-attention-setting'),",
"lineNumber": 118, "lineNumber": 116,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -897,7 +897,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.audio-notification-setting'),", "line": " el: this.$('.audio-notification-setting'),",
"lineNumber": 126, "lineNumber": 124,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -906,7 +906,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.spell-check-setting'),", "line": " el: this.$('.spell-check-setting'),",
"lineNumber": 133, "lineNumber": 131,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -915,7 +915,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " const $msg = this.$('.spell-check-setting-message');", "line": " const $msg = this.$('.spell-check-setting-message');",
"lineNumber": 137, "lineNumber": 135,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -924,7 +924,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.menu-bar-setting'),", "line": " el: this.$('.menu-bar-setting'),",
"lineNumber": 150, "lineNumber": 148,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -933,7 +933,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.always-relay-calls-setting'),", "line": " el: this.$('.always-relay-calls-setting'),",
"lineNumber": 157, "lineNumber": 155,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -942,7 +942,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.call-ringtone-notification-setting'),", "line": " el: this.$('.call-ringtone-notification-setting'),",
"lineNumber": 163, "lineNumber": 161,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -951,7 +951,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.call-system-notification-setting'),", "line": " el: this.$('.call-system-notification-setting'),",
"lineNumber": 169, "lineNumber": 167,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -960,7 +960,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.incoming-call-notification-setting'),", "line": " el: this.$('.incoming-call-notification-setting'),",
"lineNumber": 175, "lineNumber": 173,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -969,7 +969,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.media-permissions'),", "line": " el: this.$('.media-permissions'),",
"lineNumber": 181, "lineNumber": 179,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -978,7 +978,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " el: this.$('.media-camera-permissions'),", "line": " el: this.$('.media-camera-permissions'),",
"lineNumber": 186, "lineNumber": 184,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -987,7 +987,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('.sync-setting').append(syncView.el);", "line": " this.$('.sync-setting').append(syncView.el);",
"lineNumber": 192, "lineNumber": 190,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -996,7 +996,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('.sync-setting').append(syncView.el);", "line": " this.$('.sync-setting').append(syncView.el);",
"lineNumber": 192, "lineNumber": 190,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -1005,7 +1005,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('.sync').text(i18n('syncNow'));", "line": " this.$('.sync').text(i18n('syncNow'));",
"lineNumber": 273, "lineNumber": 271,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1014,7 +1014,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('.sync').attr('disabled', 'disabled');", "line": " this.$('.sync').attr('disabled', 'disabled');",
"lineNumber": 277, "lineNumber": 275,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1023,7 +1023,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('.synced_at').hide();", "line": " this.$('.synced_at').hide();",
"lineNumber": 289, "lineNumber": 287,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1032,7 +1032,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/settings_view.js", "path": "js/views/settings_view.js",
"line": " this.$('.sync_failed').hide();", "line": " this.$('.sync_failed').hide();",
"lineNumber": 294, "lineNumber": 292,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-08-21T11:29:29.636Z", "updated": "2020-08-21T11:29:29.636Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1041,7 +1041,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('input.number').val(number);", "line": " this.$('input.number').val(number);",
"lineNumber": 23, "lineNumber": 21,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1050,25 +1050,25 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " el: this.$('#phone-number-input'),", "line": " el: this.$('#phone-number-input'),",
"lineNumber": 24,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js",
"line": " this.$('#error').hide();",
"lineNumber": 26, "lineNumber": 26,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
}, },
{
"rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js",
"line": " this.$('#error').hide();",
"lineNumber": 28,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input"
},
{ {
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " const verificationCode = $('#code')", "line": " const verificationCode = $('#code')",
"lineNumber": 39, "lineNumber": 37,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1077,7 +1077,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#status').text(s);", "line": " this.$('#status').text(s);",
"lineNumber": 52, "lineNumber": 50,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1086,7 +1086,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " const verificationCode = $('#code')", "line": " const verificationCode = $('#code')",
"lineNumber": 55, "lineNumber": 53,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1095,7 +1095,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#error')", "line": " this.$('#error')",
"lineNumber": 66, "lineNumber": 64,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1104,7 +1104,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " if (this.$('#number-container').hasClass('valid')) {", "line": " if (this.$('#number-container').hasClass('valid')) {",
"lineNumber": 73, "lineNumber": 71,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1113,7 +1113,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#request-sms, #request-voice').prop('disabled', 'disabled');", "line": " this.$('#request-sms, #request-voice').prop('disabled', 'disabled');",
"lineNumber": 76, "lineNumber": 74,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1122,7 +1122,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#code').addClass('invalid');", "line": " this.$('#code').addClass('invalid');",
"lineNumber": 81, "lineNumber": 79,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1131,7 +1131,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#code').removeClass('invalid');", "line": " this.$('#code').removeClass('invalid');",
"lineNumber": 83, "lineNumber": 81,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1140,7 +1140,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#error').hide();", "line": " this.$('#error').hide();",
"lineNumber": 88, "lineNumber": 86,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1149,7 +1149,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#step2')", "line": " this.$('#step2')",
"lineNumber": 94, "lineNumber": 92,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1158,7 +1158,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#number-container').addClass('invalid');", "line": " this.$('#number-container').addClass('invalid');",
"lineNumber": 98, "lineNumber": 96,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1167,7 +1167,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " $('#error').hide();", "line": " $('#error').hide();",
"lineNumber": 103, "lineNumber": 101,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1176,7 +1176,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#step2')", "line": " this.$('#step2')",
"lineNumber": 109, "lineNumber": 107,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1185,7 +1185,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/standalone_registration_view.js", "path": "js/views/standalone_registration_view.js",
"line": " this.$('#number-container').addClass('invalid');", "line": " this.$('#number-container').addClass('invalid');",
"lineNumber": 113, "lineNumber": 111,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1194,7 +1194,7 @@
"rule": "jQuery-html(", "rule": "jQuery-html(",
"path": "js/views/toast_view.js", "path": "js/views/toast_view.js",
"line": " this.$el.html(", "line": " this.$el.html(",
"lineNumber": 22, "lineNumber": 20,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-15T00:38:04.183Z" "updated": "2018-09-15T00:38:04.183Z"
}, },
@ -1202,7 +1202,7 @@
"rule": "jQuery-appendTo(", "rule": "jQuery-appendTo(",
"path": "js/views/toast_view.js", "path": "js/views/toast_view.js",
"line": " toast.$el.appendTo(el);", "line": " toast.$el.appendTo(el);",
"lineNumber": 36, "lineNumber": 34,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2019-11-06T19:56:38.557Z", "updated": "2019-11-06T19:56:38.557Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1211,7 +1211,7 @@
"rule": "jQuery-html(", "rule": "jQuery-html(",
"path": "js/views/whisper_view.js", "path": "js/views/whisper_view.js",
"line": " this.$el.html(Mustache.render(template, attrs, partials));", "line": " this.$el.html(Mustache.render(template, attrs, partials));",
"lineNumber": 51, "lineNumber": 49,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-15T00:38:04.183Z", "updated": "2018-09-15T00:38:04.183Z",
"reasonDetail": "Value set came directly from Mustache tempating engine" "reasonDetail": "Value set came directly from Mustache tempating engine"
@ -1220,7 +1220,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/whisper_view.js", "path": "js/views/whisper_view.js",
"line": " this.$el.append(dialog.el);", "line": " this.$el.append(dialog.el);",
"lineNumber": 62, "lineNumber": 60,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z", "updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes" "reasonDetail": "Interacting with already-existing DOM nodes"
@ -1229,7 +1229,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/whisper_view.js", "path": "js/views/whisper_view.js",
"line": " $('script[type=\"text/x-tmpl-mustache\"]').each((i, el) => {", "line": " $('script[type=\"text/x-tmpl-mustache\"]').each((i, el) => {",
"lineNumber": 71, "lineNumber": 69,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1238,7 +1238,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/whisper_view.js", "path": "js/views/whisper_view.js",
"line": " const $el = $(el);", "line": " const $el = $(el);",
"lineNumber": 72, "lineNumber": 70,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z", "updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input" "reasonDetail": "Protected from arbitrary input"
@ -1247,7 +1247,7 @@
"rule": "jQuery-html(", "rule": "jQuery-html(",
"path": "js/views/whisper_view.js", "path": "js/views/whisper_view.js",
"line": " templates[id] = $el.html();", "line": " templates[id] = $el.html();",
"lineNumber": 74, "lineNumber": 72,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2018-09-15T00:38:04.183Z", "updated": "2018-09-15T00:38:04.183Z",
"reasonDetail": "Getting the value, not setting it" "reasonDetail": "Getting the value, not setting it"
@ -2134,7 +2134,7 @@
"line": " if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), { hard: true }).split('\\n')", "line": " if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), { hard: true }).split('\\n')",
"lineNumber": 216, "lineNumber": 216,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-09-04T14:54:43.116Z" "updated": "2020-09-04T18:54:59.993Z"
}, },
{ {
"rule": "jQuery-load(", "rule": "jQuery-load(",
@ -9824,7 +9824,7 @@
"line": " if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), {hard: true}).split('\\n')", "line": " if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), {hard: true}).split('\\n')",
"lineNumber": 212, "lineNumber": 212,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-09-04T14:54:43.116Z" "updated": "2020-09-04T18:54:59.993Z"
}, },
{ {
"rule": "jQuery-wrap(", "rule": "jQuery-wrap(",
@ -12954,7 +12954,7 @@
"line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(quote, 'binary', window.dcodeIO.ByteBuffer.LITTLE_ENDIAN);", "line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(quote, 'binary', window.dcodeIO.ByteBuffer.LITTLE_ENDIAN);",
"lineNumber": 1049, "lineNumber": 1049,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-09-04T00:33:28.532Z" "updated": "2020-09-08T23:07:22.682Z"
}, },
{ {
"rule": "jQuery-wrap(", "rule": "jQuery-wrap(",
@ -12962,6 +12962,6 @@
"line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(", "line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(",
"lineNumber": 1748, "lineNumber": 1748,
"reasonCategory": "falseMatch", "reasonCategory": "falseMatch",
"updated": "2020-09-04T00:33:28.532Z" "updated": "2020-09-08T23:07:22.682Z"
} }
] ]