+
);
diff --git a/ts/styleguide/StyleGuideUtil.ts b/ts/styleguide/StyleGuideUtil.ts
index 5504d695e2c1..49faa0a42c2c 100644
--- a/ts/styleguide/StyleGuideUtil.ts
+++ b/ts/styleguide/StyleGuideUtil.ts
@@ -113,7 +113,10 @@ _.noConflict();
// @ts-ignore
window.log = {
+ // tslint:disable-next-line no-console
info: console.log,
- error: console.log,
- war: console.log,
+ // tslint:disable-next-line no-console
+ error: console.error,
+ // tslint:disable-next-line no-console
+ warn: console.warn,
};
diff --git a/ts/test/state/selectors/conversations_test.ts b/ts/test/state/selectors/conversations_test.ts
new file mode 100644
index 000000000000..167fa77d71a7
--- /dev/null
+++ b/ts/test/state/selectors/conversations_test.ts
@@ -0,0 +1,96 @@
+import { assert } from 'chai';
+
+import { ConversationLookupType } from '../../../state/ducks/conversations';
+import {
+ _getConversationComparator,
+ _getLeftPaneList,
+} from '../../../state/selectors/conversations';
+
+describe('state/selectors/conversations', () => {
+ describe('#getLeftPaneList', () => {
+ it('sorts conversations based on timestamp then by intl-friendly title', () => {
+ const i18n = (key: string) => key;
+ const regionCode = 'US';
+ const conversations: ConversationLookupType = {
+ id1: {
+ id: 'id1',
+ activeAt: Date.now(),
+ name: 'No timestamp',
+ timestamp: 0,
+ phoneNumber: 'notused',
+
+ type: 'direct',
+ isMe: false,
+ lastUpdated: Date.now(),
+ unreadCount: 1,
+ isSelected: false,
+ isTyping: false,
+ },
+ id2: {
+ id: 'id2',
+ activeAt: Date.now(),
+ name: 'B',
+ timestamp: 20,
+ phoneNumber: 'notused',
+
+ type: 'direct',
+ isMe: false,
+ lastUpdated: Date.now(),
+ unreadCount: 1,
+ isSelected: false,
+ isTyping: false,
+ },
+ id3: {
+ id: 'id3',
+ activeAt: Date.now(),
+ name: 'C',
+ timestamp: 20,
+ phoneNumber: 'notused',
+
+ type: 'direct',
+ isMe: false,
+ lastUpdated: Date.now(),
+ unreadCount: 1,
+ isSelected: false,
+ isTyping: false,
+ },
+ id4: {
+ id: 'id4',
+ activeAt: Date.now(),
+ name: 'Á',
+ timestamp: 20,
+ phoneNumber: 'notused',
+
+ type: 'direct',
+ isMe: false,
+ lastUpdated: Date.now(),
+ unreadCount: 1,
+ isSelected: false,
+ isTyping: false,
+ },
+ id5: {
+ id: 'id5',
+ activeAt: Date.now(),
+ name: 'First!',
+ timestamp: 30,
+ phoneNumber: 'notused',
+
+ type: 'direct',
+ isMe: false,
+ lastUpdated: Date.now(),
+ unreadCount: 1,
+ isSelected: false,
+ isTyping: false,
+ },
+ };
+ const comparator = _getConversationComparator(i18n, regionCode);
+ const list = _getLeftPaneList(conversations, comparator);
+
+ assert.strictEqual(list[0].name, 'First!');
+ assert.strictEqual(list[1].name, 'Á');
+ assert.strictEqual(list[2].name, 'B');
+ assert.strictEqual(list[3].name, 'C');
+ assert.strictEqual(list[4].name, 'No timestamp');
+ });
+ });
+});
diff --git a/ts/test/types/Attachment_test.ts b/ts/test/types/Attachment_test.ts
index 834c338c4754..3e219c2695e7 100644
--- a/ts/test/types/Attachment_test.ts
+++ b/ts/test/types/Attachment_test.ts
@@ -162,7 +162,6 @@ describe('Attachment', () => {
it('should return true for legacy Android voice message attachment', () => {
const attachment: Attachment.Attachment = {
- fileName: null,
data: stringToArrayBuffer('voice message'),
contentType: MIME.AUDIO_MP3,
};
diff --git a/ts/test/types/Conversation_test.ts b/ts/test/types/Conversation_test.ts
index 8d6074186799..db79bc5b88dd 100644
--- a/ts/test/types/Conversation_test.ts
+++ b/ts/test/types/Conversation_test.ts
@@ -10,17 +10,9 @@ import {
describe('Conversation', () => {
describe('createLastMessageUpdate', () => {
it('should reset last message if conversation has no messages', () => {
- const input = {
- currentLastMessageText: null,
- currentTimestamp: null,
- lastMessage: null,
- lastMessageStatus: null,
- lastMessageNotificationText: null,
- };
+ const input = {};
const expected = {
lastMessage: '',
- lastMessageStatus: null,
- timestamp: null,
};
const actual = Conversation.createLastMessageUpdate(input);
@@ -56,7 +48,6 @@ describe('Conversation', () => {
const input = {
currentLastMessageText: 'bingo',
currentTimestamp: 555,
- lastMessageStatus: null,
lastMessage: {
type: 'verified-change',
conversationId: 'foo',
@@ -67,7 +58,7 @@ describe('Conversation', () => {
};
const expected = {
lastMessage: 'bingo',
- lastMessageStatus: null,
+ lastMessageStatus: undefined,
timestamp: 555,
};
@@ -81,7 +72,6 @@ describe('Conversation', () => {
const input = {
currentLastMessageText: 'I am expired',
currentTimestamp: 555,
- lastMessageStatus: null,
lastMessage: {
type: 'incoming',
conversationId: 'foo',
@@ -97,7 +87,7 @@ describe('Conversation', () => {
};
const expected = {
lastMessage: 'Last message before expired',
- lastMessageStatus: null,
+ lastMessageStatus: undefined,
timestamp: 555,
};
diff --git a/ts/types/Attachment.ts b/ts/types/Attachment.ts
index 7f812d473980..6a9c65359d8f 100644
--- a/ts/types/Attachment.ts
+++ b/ts/types/Attachment.ts
@@ -6,9 +6,250 @@ import * as MIME from './MIME';
import { arrayBufferToObjectURL } from '../util/arrayBufferToObjectURL';
import { saveURLAsFile } from '../util/saveURLAsFile';
import { SignalService } from '../protobuf';
+import {
+ isImageTypeSupported,
+ isVideoTypeSupported,
+} from '../util/GoogleChrome';
+import { LocalizerType } from './Util';
+
+const MAX_WIDTH = 300;
+const MAX_HEIGHT = MAX_WIDTH * 1.5;
+const MIN_WIDTH = 200;
+const MIN_HEIGHT = 50;
+
+// Used for display
+
+export interface AttachmentType {
+ caption?: string;
+ contentType: MIME.MIMEType;
+ fileName: string;
+ /** Not included in protobuf, needs to be pulled from flags */
+ isVoiceMessage?: boolean;
+ /** For messages not already on disk, this will be a data url */
+ url: string;
+ size?: number;
+ fileSize?: string;
+ pending?: boolean;
+ width?: number;
+ height?: number;
+ screenshot?: {
+ height: number;
+ width: number;
+ url: string;
+ contentType: MIME.MIMEType;
+ };
+ thumbnail?: {
+ height: number;
+ width: number;
+ url: string;
+ contentType: MIME.MIMEType;
+ };
+}
+
+// UI-focused functions
+
+export function getExtensionForDisplay({
+ fileName,
+ contentType,
+}: {
+ fileName: string;
+ contentType: MIME.MIMEType;
+}): string | undefined {
+ if (fileName && fileName.indexOf('.') >= 0) {
+ const lastPeriod = fileName.lastIndexOf('.');
+ const extension = fileName.slice(lastPeriod + 1);
+ if (extension.length) {
+ return extension;
+ }
+ }
+
+ if (!contentType) {
+ return;
+ }
+
+ const slash = contentType.indexOf('/');
+ if (slash >= 0) {
+ return contentType.slice(slash + 1);
+ }
+
+ return;
+}
+
+export function isAudio(attachments?: Array
) {
+ return (
+ attachments &&
+ attachments[0] &&
+ attachments[0].contentType &&
+ MIME.isAudio(attachments[0].contentType)
+ );
+}
+
+export function canDisplayImage(attachments?: Array) {
+ const { height, width } =
+ attachments && attachments[0] ? attachments[0] : { height: 0, width: 0 };
+
+ return (
+ height &&
+ height > 0 &&
+ height <= 4096 &&
+ width &&
+ width > 0 &&
+ width <= 4096
+ );
+}
+
+export function getThumbnailUrl(attachment: AttachmentType) {
+ if (attachment.thumbnail) {
+ return attachment.thumbnail.url;
+ }
+
+ return getUrl(attachment);
+}
+
+export function getUrl(attachment: AttachmentType) {
+ if (attachment.screenshot) {
+ return attachment.screenshot.url;
+ }
+
+ return attachment.url;
+}
+
+export function isImage(attachments?: Array) {
+ return (
+ attachments &&
+ attachments[0] &&
+ attachments[0].contentType &&
+ isImageTypeSupported(attachments[0].contentType)
+ );
+}
+
+export function isImageAttachment(attachment: AttachmentType) {
+ return (
+ attachment &&
+ attachment.contentType &&
+ isImageTypeSupported(attachment.contentType)
+ );
+}
+export function hasImage(attachments?: Array) {
+ return (
+ attachments &&
+ attachments[0] &&
+ (attachments[0].url || attachments[0].pending)
+ );
+}
+
+export function isVideo(attachments?: Array) {
+ return attachments && isVideoAttachment(attachments[0]);
+}
+
+export function isVideoAttachment(attachment?: AttachmentType) {
+ return (
+ attachment &&
+ attachment.contentType &&
+ isVideoTypeSupported(attachment.contentType)
+ );
+}
+
+export function hasVideoScreenshot(attachments?: Array) {
+ const firstAttachment = attachments ? attachments[0] : null;
+
+ return (
+ firstAttachment &&
+ firstAttachment.screenshot &&
+ firstAttachment.screenshot.url
+ );
+}
+
+type DimensionsType = {
+ height: number;
+ width: number;
+};
+
+export function getImageDimensions(attachment: AttachmentType): DimensionsType {
+ const { height, width } = attachment;
+ if (!height || !width) {
+ return {
+ height: MIN_HEIGHT,
+ width: MIN_WIDTH,
+ };
+ }
+
+ const aspectRatio = height / width;
+ const targetWidth = Math.max(Math.min(MAX_WIDTH, width), MIN_WIDTH);
+ const candidateHeight = Math.round(targetWidth * aspectRatio);
+
+ return {
+ width: targetWidth,
+ height: Math.max(Math.min(MAX_HEIGHT, candidateHeight), MIN_HEIGHT),
+ };
+}
+
+export function areAllAttachmentsVisual(
+ attachments?: Array
+): boolean {
+ if (!attachments) {
+ return false;
+ }
+
+ const max = attachments.length;
+ for (let i = 0; i < max; i += 1) {
+ const attachment = attachments[i];
+ if (!isImageAttachment(attachment) && !isVideoAttachment(attachment)) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+export function getGridDimensions(
+ attachments?: Array
+): null | DimensionsType {
+ if (!attachments || !attachments.length) {
+ return null;
+ }
+
+ if (!isImage(attachments) && !isVideo(attachments)) {
+ return null;
+ }
+
+ if (attachments.length === 1) {
+ return getImageDimensions(attachments[0]);
+ }
+
+ if (attachments.length === 2) {
+ return {
+ height: 150,
+ width: 300,
+ };
+ }
+
+ if (attachments.length === 4) {
+ return {
+ height: 300,
+ width: 300,
+ };
+ }
+
+ return {
+ height: 200,
+ width: 300,
+ };
+}
+
+export function getAlt(
+ attachment: AttachmentType,
+ i18n: LocalizerType
+): string {
+ return isVideoAttachment(attachment)
+ ? i18n('videoAttachmentAlt')
+ : i18n('imageAttachmentAlt');
+}
+
+// Migration-related attachment stuff
export type Attachment = {
- fileName?: string | null;
+ fileName?: string;
flags?: SignalService.AttachmentPointer.Flags;
contentType?: MIME.MIMEType;
size?: number;
@@ -72,7 +313,7 @@ export const isVoiceMessage = (attachment: Attachment): boolean => {
const isLegacyAndroidVoiceMessage =
!is.undefined(attachment.contentType) &&
MIME.isAudio(attachment.contentType) &&
- attachment.fileName === null;
+ !attachment.fileName;
if (isLegacyAndroidVoiceMessage) {
return true;
}
@@ -131,9 +372,11 @@ export const getSuggestedFilename = ({
return `${prefix}${suffix}${indexSuffix}${extension}`;
};
-export const getFileExtension = (attachment: Attachment): string | null => {
+export const getFileExtension = (
+ attachment: Attachment
+): string | undefined => {
if (!attachment.contentType) {
- return null;
+ return;
}
switch (attachment.contentType) {
diff --git a/ts/types/Contact.ts b/ts/types/Contact.tsx
similarity index 90%
rename from ts/types/Contact.ts
rename to ts/types/Contact.tsx
index c5afbcb41d94..1307a0054fa8 100644
--- a/ts/types/Contact.ts
+++ b/ts/types/Contact.tsx
@@ -120,13 +120,13 @@ export function contactSelector(
};
}
-export function getName(contact: Contact): string | null {
+export function getName(contact: Contact): string | undefined {
const { name, organization } = contact;
- const displayName = (name && name.displayName) || null;
- const givenName = (name && name.givenName) || null;
- const familyName = (name && name.familyName) || null;
+ const displayName = (name && name.displayName) || undefined;
+ const givenName = (name && name.givenName) || undefined;
+ const familyName = (name && name.familyName) || undefined;
const backupName =
- (givenName && familyName && `${givenName} ${familyName}`) || null;
+ (givenName && familyName && `${givenName} ${familyName}`) || undefined;
return displayName || organization || backupName || givenName || familyName;
}
diff --git a/ts/types/Conversation.ts b/ts/types/Conversation.ts
index ec341b7540a2..58d84a697034 100644
--- a/ts/types/Conversation.ts
+++ b/ts/types/Conversation.ts
@@ -1,9 +1,9 @@
import { Message } from './Message';
interface ConversationLastMessageUpdate {
- lastMessage: string | null;
- lastMessageStatus: string | null;
- timestamp: number | null;
+ lastMessage: string;
+ lastMessageStatus?: string;
+ timestamp?: number;
}
export const createLastMessageUpdate = ({
@@ -13,26 +13,26 @@ export const createLastMessageUpdate = ({
lastMessageStatus,
lastMessageNotificationText,
}: {
- currentLastMessageText: string | null;
- currentTimestamp: number | null;
- lastMessage: Message | null;
- lastMessageStatus: string | null;
- lastMessageNotificationText: string | null;
+ currentLastMessageText?: string;
+ currentTimestamp?: number;
+ lastMessage?: Message;
+ lastMessageStatus?: string;
+ lastMessageNotificationText?: string;
}): ConversationLastMessageUpdate => {
- if (lastMessage === null) {
+ if (!lastMessage) {
return {
lastMessage: '',
- lastMessageStatus: null,
- timestamp: null,
};
}
const { type, expirationTimerUpdate } = lastMessage;
const isVerifiedChangeMessage = type === 'verified-change';
- const isExpireTimerUpdateFromSync =
- expirationTimerUpdate && expirationTimerUpdate.fromSync;
- const shouldUpdateTimestamp =
- !isVerifiedChangeMessage && !isExpireTimerUpdateFromSync;
+ const isExpireTimerUpdateFromSync = Boolean(
+ expirationTimerUpdate && expirationTimerUpdate.fromSync
+ );
+ const shouldUpdateTimestamp = Boolean(
+ !isVerifiedChangeMessage && !isExpireTimerUpdateFromSync
+ );
const newTimestamp = shouldUpdateTimestamp
? lastMessage.sent_at
@@ -44,7 +44,7 @@ export const createLastMessageUpdate = ({
: currentLastMessageText;
return {
- lastMessage: newLastMessageText,
+ lastMessage: newLastMessageText || '',
lastMessageStatus,
timestamp: newTimestamp,
};
diff --git a/ts/types/PhoneNumber.ts b/ts/types/PhoneNumber.ts
index 5ca2bb86c718..a6469fa2e59e 100644
--- a/ts/types/PhoneNumber.ts
+++ b/ts/types/PhoneNumber.ts
@@ -36,3 +36,21 @@ export function parse(
return phoneNumber;
}
+
+export function normalize(
+ phoneNumber: string,
+ options: { regionCode: string }
+): string | undefined {
+ const { regionCode } = options;
+ try {
+ const parsedNumber = instance.parse(phoneNumber, regionCode);
+
+ if (instance.isValidNumber(parsedNumber)) {
+ return instance.format(parsedNumber, PhoneNumberFormat.E164);
+ }
+
+ return;
+ } catch (error) {
+ return;
+ }
+}
diff --git a/ts/types/Util.ts b/ts/types/Util.ts
index 79826adc7b99..77599acb4cbe 100644
--- a/ts/types/Util.ts
+++ b/ts/types/Util.ts
@@ -1,13 +1,13 @@
-export type RenderTextCallback = (
+export type RenderTextCallbackType = (
options: {
text: string;
key: number;
}
) => JSX.Element | string;
-export type Localizer = (key: string, values?: Array) => string;
+export type LocalizerType = (key: string, values?: Array) => string;
-export type Color =
+export type ColorType =
| 'gray'
| 'blue'
| 'cyan'
diff --git a/ts/util/cleanSearchTerm.ts b/ts/util/cleanSearchTerm.ts
new file mode 100644
index 000000000000..75c8837c1efb
--- /dev/null
+++ b/ts/util/cleanSearchTerm.ts
@@ -0,0 +1,24 @@
+export function cleanSearchTerm(searchTerm: string) {
+ const lowercase = searchTerm.toLowerCase();
+ const withoutSpecialCharacters = lowercase.replace(
+ /([!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~])/g,
+ ' '
+ );
+ const whiteSpaceNormalized = withoutSpecialCharacters.replace(/\s+/g, ' ');
+ const byToken = whiteSpaceNormalized.split(' ');
+ const withoutSpecialTokens = byToken.filter(
+ token =>
+ token &&
+ token !== 'and' &&
+ token !== 'or' &&
+ token !== 'not' &&
+ token !== ')' &&
+ token !== '(' &&
+ token !== '+' &&
+ token !== ',' &&
+ token !== 'near'
+ );
+ const withWildcards = withoutSpecialTokens.map(token => `${token}*`);
+
+ return withWildcards.join(' ').trim();
+}
diff --git a/ts/util/formatRelativeTime.ts b/ts/util/formatRelativeTime.ts
index aabbd34c5336..80796dc513ef 100644
--- a/ts/util/formatRelativeTime.ts
+++ b/ts/util/formatRelativeTime.ts
@@ -1,12 +1,12 @@
import moment from 'moment';
-import { Localizer } from '../types/Util';
+import { LocalizerType } from '../types/Util';
-const getExtendedFormats = (i18n: Localizer) => ({
+const getExtendedFormats = (i18n: LocalizerType) => ({
y: 'lll',
M: `${i18n('timestampFormat_M') || 'MMM D'} LT`,
d: 'ddd LT',
});
-const getShortFormats = (i18n: Localizer) => ({
+const getShortFormats = (i18n: LocalizerType) => ({
y: 'll',
M: i18n('timestampFormat_M') || 'MMM D',
d: 'ddd',
@@ -28,7 +28,7 @@ function isYear(timestamp: moment.Moment) {
export function formatRelativeTime(
rawTimestamp: number | Date,
- options: { extended: boolean; i18n: Localizer }
+ options: { extended?: boolean; i18n: LocalizerType }
) {
const { extended, i18n } = options;
diff --git a/ts/util/getInitials.ts b/ts/util/getInitials.ts
index b2c89ffc54af..1b38c0984370 100644
--- a/ts/util/getInitials.ts
+++ b/ts/util/getInitials.ts
@@ -5,16 +5,16 @@ function removeNonInitials(name: string) {
return name.replace(BAD_CHARACTERS, '').replace(WHITESPACE, ' ');
}
-export function getInitials(name?: string): string | null {
+export function getInitials(name?: string): string | undefined {
if (!name) {
- return null;
+ return;
}
const cleaned = removeNonInitials(name);
const parts = cleaned.split(' ');
const initials = parts.map(part => part.trim()[0]);
if (!initials.length) {
- return null;
+ return;
}
return initials.slice(0, 2).join('');
diff --git a/ts/util/index.ts b/ts/util/index.ts
index b667028a38ea..ec0ca2e21abb 100644
--- a/ts/util/index.ts
+++ b/ts/util/index.ts
@@ -3,11 +3,13 @@ import { arrayBufferToObjectURL } from './arrayBufferToObjectURL';
import { isFileDangerous } from './isFileDangerous';
import { missingCaseError } from './missingCaseError';
import { migrateColor } from './migrateColor';
+import { makeLookup } from './makeLookup';
export {
arrayBufferToObjectURL,
GoogleChrome,
isFileDangerous,
+ makeLookup,
migrateColor,
missingCaseError,
};
diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json
index f1cc0fd7d5f2..14d77829e088 100644
--- a/ts/util/lint/exceptions.json
+++ b/ts/util/lint/exceptions.json
@@ -164,7 +164,7 @@
"rule": "jQuery-load(",
"path": "js/conversation_controller.js",
"line": " async load() {",
- "lineNumber": 210,
+ "lineNumber": 179,
"reasonCategory": "falseMatch",
"updated": "2018-10-02T21:00:44.007Z"
},
@@ -172,7 +172,7 @@
"rule": "jQuery-load(",
"path": "js/conversation_controller.js",
"line": " this._initialPromise = load();",
- "lineNumber": 245,
+ "lineNumber": 214,
"reasonCategory": "falseMatch",
"updated": "2018-10-02T21:00:44.007Z"
},
@@ -207,7 +207,7 @@
"rule": "jQuery-wrap(",
"path": "js/models/messages.js",
"line": " return this.send(wrap(promise));",
- "lineNumber": 870,
+ "lineNumber": 935,
"reasonCategory": "falseMatch",
"updated": "2018-10-05T23:12:28.961Z"
},
@@ -215,7 +215,7 @@
"rule": "jQuery-wrap(",
"path": "js/models/messages.js",
"line": " return wrap(",
- "lineNumber": 1117,
+ "lineNumber": 1182,
"reasonCategory": "falseMatch",
"updated": "2018-10-05T23:12:28.961Z"
},
@@ -388,42 +388,6 @@
"updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes"
},
- {
- "rule": "jQuery-$(",
- "path": "js/views/attachment_view.js",
- "line": " const $el = $('');",
- "lineNumber": 53,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-append(",
- "path": "js/views/attachment_view.js",
- "line": " this.$el.append($el);",
- "lineNumber": 55,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
- {
- "rule": "jQuery-appendTo(",
- "path": "js/views/attachment_view.js",
- "line": " this.view.$el.appendTo(this.$el);",
- "lineNumber": 198,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
- {
- "rule": "jQuery-appendTo(",
- "path": "js/views/attachment_view.js",
- "line": " this.fileView.$el.appendTo(this.$el.empty());",
- "lineNumber": 221,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
{
"rule": "jQuery-$(",
"path": "js/views/confirmation_dialog_view.js",
@@ -442,123 +406,6 @@
"updated": "2018-10-02T21:18:39.026Z",
"reasonDetail": "Operating on previously-existing DOM elements"
},
- {
- "rule": "jQuery-append(",
- "path": "js/views/conversation_list_item_view.js",
- "line": " this.$el.append(this.childView.el);",
- "lineNumber": 46,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/conversation_list_view.js",
- "line": " const $el = this.$(`.${conversation.cid}`);",
- "lineNumber": 13,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/conversation_list_view.js",
- "line": " const $allConversations = this.$('.conversation-list-item');",
- "lineNumber": 30,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-prepend(",
- "path": "js/views/conversation_list_view.js",
- "line": " this.$el.prepend($el);",
- "lineNumber": 46,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
- {
- "rule": "jQuery-append(",
- "path": "js/views/conversation_list_view.js",
- "line": " this.$el.append($el);",
- "lineNumber": 48,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/conversation_list_view.js",
- "line": " const target = this.$(`.${targetConversation.cid}`);",
- "lineNumber": 51,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-insertAfter(",
- "path": "js/views/conversation_list_view.js",
- "line": " $el.insertAfter(target);",
- "lineNumber": 52,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/conversation_list_view.js",
- "line": " if ($('.selected').length) {",
- "lineNumber": 55,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/conversation_list_view.js",
- "line": " const $el = this.$(`.${conversation.cid}`);",
- "lineNumber": 62,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/conversation_search_view.js",
- "line": " this.$new_contact = this.$('.new-contact');",
- "lineNumber": 40,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-append(",
- "path": "js/views/conversation_search_view.js",
- "line": " this.$el.append(this.typeahead_view.el);",
- "lineNumber": 57,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/conversation_search_view.js",
- "line": " this.new_contact_view.$('.number').text(i18n('invalidNumberError'));",
- "lineNumber": 119,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-insertAfter(",
- "path": "js/views/conversation_search_view.js",
- "line": " this.hintView.$el.insertAfter(this.$input);",
- "lineNumber": 155,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T18:13:29.628Z",
- "reasonDetail": "Interacting with already-existing DOM nodes"
- },
{
"rule": "jQuery-$(",
"path": "js/views/debug_log_view.js",
@@ -670,7 +517,7 @@
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
"line": " let $el = this.$(`#${id}`);",
- "lineNumber": 26,
+ "lineNumber": 28,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input"
@@ -679,7 +526,7 @@
"rule": "jQuery-prependTo(",
"path": "js/views/inbox_view.js",
"line": " $el.prependTo(this.el);",
- "lineNumber": 35,
+ "lineNumber": 37,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes"
@@ -688,34 +535,16 @@
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
"line": " this.$('.message').text(message);",
- "lineNumber": 79,
+ "lineNumber": 49,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input"
},
- {
- "rule": "jQuery-$(",
- "path": "js/views/inbox_view.js",
- "line": " this.$('.main-header-placeholder').append(this.mainHeaderView.el);",
- "lineNumber": 107,
- "reasonCategory": "usageTrusted",
- "updated": "2018-10-02T21:18:39.026Z",
- "reasonDetail": "Operating on already-existing DOM elements"
- },
- {
- "rule": "jQuery-append(",
- "path": "js/views/inbox_view.js",
- "line": " this.$('.main-header-placeholder').append(this.mainHeaderView.el);",
- "lineNumber": 107,
- "reasonCategory": "usageTrusted",
- "updated": "2018-10-02T21:18:39.026Z",
- "reasonDetail": "Operating on already-existing DOM elements"
- },
{
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
"line": " el: this.$('.conversation-stack'),",
- "lineNumber": 110,
+ "lineNumber": 66,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input"
@@ -724,43 +553,16 @@
"rule": "jQuery-prependTo(",
"path": "js/views/inbox_view.js",
"line": " this.appLoadingScreen.$el.prependTo(this.el);",
- "lineNumber": 117,
+ "lineNumber": 73,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes"
},
- {
- "rule": "jQuery-$(",
- "path": "js/views/inbox_view.js",
- "line": " el: this.$('.inbox'),",
- "lineNumber": 131,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/inbox_view.js",
- "line": " el: this.$('.search-results'),",
- "lineNumber": 147,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/inbox_view.js",
- "line": " input: this.$('input.search'),",
- "lineNumber": 148,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
{
"rule": "jQuery-append(",
"path": "js/views/inbox_view.js",
"line": " .append(this.networkStatusView.render().el);",
- "lineNumber": 166,
+ "lineNumber": 89,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes"
@@ -769,7 +571,7 @@
"rule": "jQuery-prependTo(",
"path": "js/views/inbox_view.js",
"line": " banner.$el.prependTo(this.$el);",
- "lineNumber": 170,
+ "lineNumber": 93,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T18:13:29.628Z",
"reasonDetail": "Interacting with already-existing DOM nodes"
@@ -777,64 +579,73 @@
{
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
- "line": " if (e && this.$(e.target).closest('.placeholder').length) {",
- "lineNumber": 225,
+ "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);",
+ "lineNumber": 164,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
+ "updated": "2019-03-08T23:49:08.796Z",
+ "reasonDetail": "Protected from arbitrary input"
+ },
+ {
+ "rule": "jQuery-append(",
+ "path": "js/views/inbox_view.js",
+ "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);",
+ "lineNumber": 164,
+ "reasonCategory": "usageTrusted",
+ "updated": "2019-03-08T23:49:08.796Z",
+ "reasonDetail": "Protected from arbitrary input"
+ },
+ {
+ "rule": "jQuery-$(",
+ "path": "js/views/inbox_view.js",
+ "line": " if (e && this.$(e.target).closest('.placeholder').length) {",
+ "lineNumber": 205,
+ "reasonCategory": "usageTrusted",
+ "updated": "2019-03-08T23:49:08.796Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
"line": " this.$('#header, .gutter').addClass('inactive');",
- "lineNumber": 229,
+ "lineNumber": 209,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
+ "updated": "2019-03-08T23:49:08.796Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
"line": " this.$('.conversation-stack').addClass('inactive');",
- "lineNumber": 233,
+ "lineNumber": 213,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
+ "updated": "2019-03-08T23:49:08.796Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
"line": " this.$('.conversation:first .menu').trigger('close');",
- "lineNumber": 235,
+ "lineNumber": 215,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "jQuery-$(",
- "path": "js/views/inbox_view.js",
- "line": " const input = this.$('input.search');",
- "lineNumber": 242,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
+ "updated": "2019-03-08T23:49:08.796Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
"line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {",
- "lineNumber": 266,
+ "lineNumber": 230,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
+ "updated": "2019-03-08T23:49:08.796Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/inbox_view.js",
"line": " this.$('.conversation:first .recorder').trigger('close');",
- "lineNumber": 269,
+ "lineNumber": 233,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-19T21:59:32.770Z",
+ "updated": "2019-03-08T23:49:08.796Z",
"reasonDetail": "Protected from arbitrary input"
},
{
@@ -1608,6 +1419,22 @@
"reasonCategory": "falseMatch",
"updated": "2018-10-05T23:12:28.961Z"
},
+ {
+ "rule": "jQuery-wrap(",
+ "path": "node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js",
+ "line": " function wrap(innerFn, outerFn, self, tryLocsList) {",
+ "lineNumber": 36,
+ "reasonCategory": "falseMatch",
+ "updated": "2019-03-09T00:08:44.242Z"
+ },
+ {
+ "rule": "jQuery-wrap(",
+ "path": "node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js",
+ "line": " wrap(innerFn, outerFn, self, tryLocsList)",
+ "lineNumber": 228,
+ "reasonCategory": "falseMatch",
+ "updated": "2019-03-09T00:08:44.242Z"
+ },
{
"rule": "eval",
"path": "node_modules/@protobufjs/inquire/index.js",
@@ -2398,54 +2225,6 @@
"reasonCategory": "falseMatch",
"updated": "2019-02-22T01:08:09.603Z"
},
- {
- "rule": "jQuery-wrap(",
- "path": "node_modules/electron/node_modules/@types/node/globals.d.ts",
- "line": " wrap(oldStream: ReadableStream): this;",
- "lineNumber": 573,
- "reasonCategory": "falseMatch",
- "updated": "2019-02-22T01:08:09.603Z"
- },
- {
- "rule": "jQuery-wrap(",
- "path": "node_modules/electron/node_modules/@types/node/globals.d.ts",
- "line": " static wrap(code: string): string;",
- "lineNumber": 976,
- "reasonCategory": "falseMatch",
- "updated": "2019-02-22T01:08:09.603Z"
- },
- {
- "rule": "eval",
- "path": "node_modules/electron/node_modules/@types/node/repl.d.ts",
- "line": " * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can",
- "lineNumber": 31,
- "reasonCategory": "falseMatch",
- "updated": "2019-02-22T01:08:09.603Z"
- },
- {
- "rule": "eval",
- "path": "node_modules/electron/node_modules/@types/node/repl.d.ts",
- "line": " * for the JavaScript `eval()` function.",
- "lineNumber": 180,
- "reasonCategory": "falseMatch",
- "updated": "2019-02-22T01:08:09.603Z"
- },
- {
- "rule": "jQuery-wrap(",
- "path": "node_modules/electron/node_modules/@types/node/stream.d.ts",
- "line": " wrap(oldStream: NodeJS.ReadableStream): this;",
- "lineNumber": 32,
- "reasonCategory": "falseMatch",
- "updated": "2019-02-22T01:08:09.603Z"
- },
- {
- "rule": "jQuery-append(",
- "path": "node_modules/electron/node_modules/@types/node/url.d.ts",
- "line": " append(name: string, value: string): void;",
- "lineNumber": 90,
- "reasonCategory": "falseMatch",
- "updated": "2019-02-22T01:08:09.603Z"
- },
{
"rule": "jQuery-$(",
"path": "node_modules/emoji-js/lib/jquery.emoji.js",
@@ -3986,6 +3765,46 @@
"reasonCategory": "falseMatch",
"updated": "2018-09-19T18:06:35.446Z"
},
+ {
+ "rule": "jQuery-after(",
+ "path": "node_modules/lodash-es/after.js",
+ "line": " * var done = _.after(saves.length, function() {",
+ "lineNumber": 21,
+ "reasonCategory": "falseMatch",
+ "updated": "2019-03-09T00:08:44.242Z"
+ },
+ {
+ "rule": "jQuery-after(",
+ "path": "node_modules/lodash-es/after.js",
+ "line": "function after(n, func) {",
+ "lineNumber": 30,
+ "reasonCategory": "falseMatch",
+ "updated": "2019-03-09T00:08:44.242Z"
+ },
+ {
+ "rule": "jQuery-before(",
+ "path": "node_modules/lodash-es/before.js",
+ "line": " * jQuery(element).on('click', _.before(5, addContactToList));",
+ "lineNumber": 20,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
+ },
+ {
+ "rule": "jQuery-before(",
+ "path": "node_modules/lodash-es/before.js",
+ "line": "function before(n, func) {",
+ "lineNumber": 23,
+ "reasonCategory": "falseMatch",
+ "updated": "2019-03-09T00:08:44.242Z"
+ },
+ {
+ "rule": "jQuery-before(",
+ "path": "node_modules/lodash-es/once.js",
+ "line": " return before(2, func);",
+ "lineNumber": 22,
+ "reasonCategory": "falseMatch",
+ "updated": "2019-03-09T00:08:44.242Z"
+ },
{
"rule": "jQuery-after(",
"path": "node_modules/lodash/after.js",
@@ -4600,82 +4419,82 @@
"rule": "eval",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": " var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval",
- "lineNumber": 880,
+ "lineNumber": 878,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-15T00:38:04.183Z",
- "reasonDetail": "Hard-coded value"
+ "updated": "2019-03-09T00:08:44.242Z",
+ "reasonDetail": "Eval is used here to produce and evaluate the expression 'require'"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": "function load(filename, root, callback) {",
- "lineNumber": 2194,
+ "lineNumber": 2185,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": " return root.load(filename, callback);",
- "lineNumber": 2200,
+ "lineNumber": 2191,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": "// function load(filename:string, callback:LoadCallback):undefined",
- "lineNumber": 2213,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 2204,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": "// function load(filename:string, [root:Root]):Promise",
- "lineNumber": 2225,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 2216,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": "Root.prototype.load = function load(filename, options, callback) {",
- "lineNumber": 4106,
+ "lineNumber": 4096,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": "// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined",
- "lineNumber": 4233,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 4223,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": "// function load(filename:string, callback:LoadCallback):undefined",
- "lineNumber": 4243,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 4233,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": "// function load(filename:string, [options:IParseOptions]):Promise",
- "lineNumber": 4253,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 4243,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/light/protobuf.js",
"line": " return this.load(filename, options, SYNC);",
- "lineNumber": 4266,
+ "lineNumber": 4256,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "eval",
@@ -4696,10 +4515,10 @@
"rule": "eval",
"path": "node_modules/protobufjs/dist/minimal/protobuf.js",
"line": " var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval",
- "lineNumber": 662,
+ "lineNumber": 660,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-15T00:38:04.183Z",
- "reasonDetail": "Hard-coded value"
+ "updated": "2019-03-09T00:08:44.242Z",
+ "reasonDetail": "Eval is used here to produce and evaluate the expression 'require'"
},
{
"rule": "eval",
@@ -4713,82 +4532,82 @@
"rule": "eval",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": " var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval",
- "lineNumber": 880,
+ "lineNumber": 878,
"reasonCategory": "usageTrusted",
- "updated": "2018-09-15T00:38:04.183Z",
- "reasonDetail": "Hard-coded value"
+ "updated": "2019-03-09T00:08:44.242Z",
+ "reasonDetail": "Eval is used here to produce and evaluate the expression 'require'"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": "function load(filename, root, callback) {",
- "lineNumber": 2595,
+ "lineNumber": 2586,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": " return root.load(filename, callback);",
- "lineNumber": 2601,
+ "lineNumber": 2592,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": "// function load(filename:string, callback:LoadCallback):undefined",
- "lineNumber": 2614,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 2605,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": "// function load(filename:string, [root:Root]):Promise",
- "lineNumber": 2626,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 2617,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": "Root.prototype.load = function load(filename, options, callback) {",
- "lineNumber": 5281,
+ "lineNumber": 5270,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": "// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined",
- "lineNumber": 5408,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 5397,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": "// function load(filename:string, callback:LoadCallback):undefined",
- "lineNumber": 5418,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 5407,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": "// function load(filename:string, [options:IParseOptions]):Promise",
- "lineNumber": 5428,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "lineNumber": 5417,
+ "reasonCategory": "exampleCode",
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/dist/protobuf.js",
"line": " return this.load(filename, options, SYNC);",
- "lineNumber": 5441,
+ "lineNumber": 5430,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "eval",
@@ -4816,81 +4635,81 @@
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/index.d.ts",
"line": "export function load(filename: (string|string[]), root: Root, callback: LoadCallback): void;",
- "lineNumber": 416,
+ "lineNumber": 414,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/index.d.ts",
"line": "export function load(filename: (string|string[]), callback: LoadCallback): void;",
- "lineNumber": 424,
+ "lineNumber": 422,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/index.d.ts",
"line": "export function load(filename: (string|string[]), root?: Root): Promise;",
- "lineNumber": 433,
+ "lineNumber": 431,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/index.d.ts",
"line": " public load(filename: (string|string[]), options: IParseOptions, callback: LoadCallback): void;",
- "lineNumber": 1252,
+ "lineNumber": 1250,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/index.d.ts",
"line": " public load(filename: (string|string[]), callback: LoadCallback): void;",
- "lineNumber": 1259,
+ "lineNumber": 1257,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
"path": "node_modules/protobufjs/index.d.ts",
"line": " public load(filename: (string|string[]), options?: IParseOptions): Promise;",
- "lineNumber": 1267,
+ "lineNumber": 1265,
"reasonCategory": "falseMatch",
- "updated": "2018-09-15T00:38:04.183Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-wrap(",
"path": "node_modules/protobufjs/node_modules/@types/node/index.d.ts",
"line": " wrap(oldStream: ReadableStream): this;",
- "lineNumber": 606,
+ "lineNumber": 456,
"reasonCategory": "falseMatch",
- "updated": "2018-09-19T18:13:29.628Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-wrap(",
"path": "node_modules/protobufjs/node_modules/@types/node/index.d.ts",
"line": " static wrap(code: string): string;",
- "lineNumber": 978,
+ "lineNumber": 824,
"reasonCategory": "falseMatch",
- "updated": "2018-09-20T20:45:24.002Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-append(",
"path": "node_modules/protobufjs/node_modules/@types/node/index.d.ts",
"line": " append(name: string, value: string): void;",
- "lineNumber": 2592,
+ "lineNumber": 2411,
"reasonCategory": "falseMatch",
- "updated": "2018-09-19T18:13:29.628Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-wrap(",
"path": "node_modules/protobufjs/node_modules/@types/node/index.d.ts",
"line": " wrap(oldStream: NodeJS.ReadableStream): this;",
- "lineNumber": 6205,
+ "lineNumber": 5464,
"reasonCategory": "falseMatch",
- "updated": "2018-09-20T20:45:24.002Z"
+ "updated": "2019-03-09T00:08:44.242Z"
},
{
"rule": "jQuery-load(",
@@ -5005,442 +4824,6 @@
"updated": "2018-09-18T19:19:27.699Z",
"reasonDetail": "What's being eval'd is a static string, with one variable: args. Args is of the form arg1, arg2, generated programmatically."
},
- {
- "rule": "React-ref",
- "path": "node_modules/react-contextmenu/dist/react-contextmenu.js",
- "lineNumber": 11,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-18T19:19:27.699Z",
- "reasonDetail": "This library does directly interact with DOM nodes to move menus around, highlight them, etc."
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.browser.development.js",
- "line": " innerHTML: true,",
- "lineNumber": 43,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.browser.development.js",
- "line": " innerhtml: 'innerHTML',",
- "lineNumber": 1223,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.browser.development.js",
- "line": " warning(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');",
- "lineNumber": 1698,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.browser.development.js",
- "line": " var innerHTML = props.dangerouslySetInnerHTML;",
- "lineNumber": 1927,
- "reasonCategory": "ruleNeeded",
- "updated": "2018-09-18T19:19:27.699Z",
- "reasonDetail": "We don't really trust this, so we have a dangerouslySetInnerHTML rule"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.browser.development.js",
- "line": " if (innerHTML.__html != null) {",
- "lineNumber": 1929,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.browser.production.min.js",
- "line": "var x={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0};function z(a,b){return(a&b)===b}",
- "lineNumber": 12,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.node.development.js",
- "line": " innerHTML: true,",
- "lineNumber": 44,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.node.development.js",
- "line": " innerhtml: 'innerHTML',",
- "lineNumber": 1224,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.node.development.js",
- "line": " warning(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');",
- "lineNumber": 1699,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z",
- "reasonDetail": "Protected from arbitrary input"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.node.development.js",
- "line": " var innerHTML = props.dangerouslySetInnerHTML;",
- "lineNumber": 1928,
- "reasonCategory": "ruleNeeded",
- "updated": "2018-09-18T19:19:27.699Z",
- "reasonDetail": "We don't really trust this, so we add a rule for dangerouslySetInnerHTML elsewhere in code"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.node.development.js",
- "line": " if (innerHTML.__html != null) {",
- "lineNumber": 1930,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom-server.node.production.min.js",
- "line": "var x={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0};function z(a,b){return(a&b)===b}",
- "lineNumber": 12,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " innerHTML: true,",
- "lineNumber": 50,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": "// SVG temp container for IE lacking innerHTML",
- "lineNumber": 12433,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " * Set the innerHTML property of a node",
- "lineNumber": 12437,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " // IE does not have innerHTML for SVG nodes, so instead we inject the",
- "lineNumber": 12444,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " if (node.namespaceURI === Namespaces.svg && !('innerHTML' in node)) {",
- "lineNumber": 12448,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " reusableSVGContainer.innerHTML = '' + html + ' ';",
- "lineNumber": 12450,
- "reasonCategory": "ruleNeeded",
- "updated": "2018-09-18T19:19:27.699Z",
- "reasonDetail": "We don't really trust this, so we add a rule for dangerouslySetInnerHTML elsewhere in code"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " node.innerHTML = html;",
- "lineNumber": 12459,
- "reasonCategory": "ruleNeeded",
- "updated": "2018-09-18T19:19:27.699Z",
- "reasonDetail": "We don't really trust this, so we add a rule for dangerouslySetInnerHTML elsewhere in code"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " * issues, inserts instead of the literal newline chars. innerHTML behaves",
- "lineNumber": 12466,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " innerhtml: 'innerHTML',",
- "lineNumber": 13035,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " warning(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');",
- "lineNumber": 13510,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " testElement.innerHTML = html;",
- "lineNumber": 13709,
- "reasonCategory": "usageTrusted",
- "updated": "2018-09-18T19:19:27.699Z",
- "reasonDetail": "This is normalizing HTML generated by React, already on its way to the DOM"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " // Create the script via .innerHTML so its \"parser-inserted\" flag is",
- "lineNumber": 13867,
- "reasonCategory": "falseMatch",
- "updated": "2018-09-18T19:19:27.699Z"
- },
- {
- "rule": "DOM-innerHTML",
- "path": "node_modules/react-dom/cjs/react-dom.development.js",
- "line": " div.innerHTML = '