diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 6f709699e2a5..aa5fd757bef5 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -164,7 +164,7 @@ "rule": "jQuery-$(", "path": "js/background.js", "line": " if ($('.dark-overlay').length) {", - "lineNumber": 253, + "lineNumber": 264, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -173,7 +173,7 @@ "rule": "jQuery-$(", "path": "js/background.js", "line": " $(document.body).prepend('
');", - "lineNumber": 256, + "lineNumber": 267, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -182,7 +182,7 @@ "rule": "jQuery-prepend(", "path": "js/background.js", "line": " $(document.body).prepend('');", - "lineNumber": 256, + "lineNumber": 267, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Hard-coded value" @@ -191,7 +191,7 @@ "rule": "jQuery-$(", "path": "js/background.js", "line": " $('.dark-overlay').on('click', () => $('.dark-overlay').remove());", - "lineNumber": 257, + "lineNumber": 268, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -200,7 +200,7 @@ "rule": "jQuery-$(", "path": "js/background.js", "line": " removeDarkOverlay: () => $('.dark-overlay').remove(),", - "lineNumber": 259, + "lineNumber": 270, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -209,7 +209,7 @@ "rule": "jQuery-$(", "path": "js/background.js", "line": " $('body').append(clearDataView.el);", - "lineNumber": 262, + "lineNumber": 273, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -218,7 +218,7 @@ "rule": "jQuery-append(", "path": "js/background.js", "line": " $('body').append(clearDataView.el);", - "lineNumber": 262, + "lineNumber": 273, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -226,32 +226,43 @@ { "rule": "jQuery-load(", "path": "js/background.js", - "lineNumber": 470, + "line": " await ConversationController.load();", + "lineNumber": 508, "reasonCategory": "falseMatch", - "updated": "2018-09-15T00:16:19.197Z" + "updated": "2018-10-02T21:00:44.007Z" }, { "rule": "jQuery-$(", "path": "js/background.js", "line": " el: $('body'),", - "lineNumber": 524, + "lineNumber": 562, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" }, { - "rule": "jQuery-load(", - "path": "js/conversation_controller.js", - "lineNumber": 187, + "rule": "jQuery-wrap(", + "path": "js/background.js", + "line": " const profileKey = dcodeIO.ByteBuffer.wrap(details.profileKey).toString(", + "lineNumber": 884, "reasonCategory": "falseMatch", - "updated": "2018-09-15T00:16:19.197Z" + "updated": "2018-10-02T21:00:44.007Z" }, { "rule": "jQuery-load(", "path": "js/conversation_controller.js", - "lineNumber": 211, + "line": " async load() {", + "lineNumber": 198, "reasonCategory": "falseMatch", - "updated": "2018-09-15T00:16:19.197Z" + "updated": "2018-10-02T21:00:44.007Z" + }, + { + "rule": "jQuery-load(", + "path": "js/conversation_controller.js", + "line": " this._initialPromise = load();", + "lineNumber": 227, + "reasonCategory": "falseMatch", + "updated": "2018-10-02T21:00:44.007Z" }, { "rule": "jQuery-$(", @@ -283,26 +294,34 @@ { "rule": "jQuery-wrap(", "path": "js/models/conversations.js", - "line": " const identityKey = dcodeIO.ByteBuffer.wrap(", - "lineNumber": 1163, + "line": " const identityKey = dcodeIO.ByteBuffer.wrap(", + "lineNumber": 1097, "reasonCategory": "falseMatch", - "updated": "2018-09-19T18:13:29.628Z" + "updated": "2018-10-02T21:00:44.007Z" }, { "rule": "jQuery-wrap(", "path": "js/models/conversations.js", - "line": " const data = dcodeIO.ByteBuffer.wrap(", - "lineNumber": 1225, + "line": " const keyBuffer = dcodeIO.ByteBuffer.wrap(key, 'base64').toArrayBuffer();", + "lineNumber": 1157, "reasonCategory": "falseMatch", - "updated": "2018-09-19T18:13:29.628Z" + "updated": "2018-10-02T21:00:44.007Z" }, { "rule": "jQuery-wrap(", "path": "js/models/conversations.js", - "line": " const name = dcodeIO.ByteBuffer.wrap(decrypted).toString('utf8');", - "lineNumber": 1235, + "line": " const name = dcodeIO.ByteBuffer.wrap(decrypted).toString('utf8');", + "lineNumber": 1170, "reasonCategory": "falseMatch", - "updated": "2018-09-19T18:13:29.628Z" + "updated": "2018-10-02T21:00:44.007Z" + }, + { + "rule": "jQuery-wrap(", + "path": "js/models/conversations.js", + "line": " const keyBuffer = dcodeIO.ByteBuffer.wrap(key, 'base64').toArrayBuffer();", + "lineNumber": 1185, + "reasonCategory": "falseMatch", + "updated": "2018-10-02T21:00:44.007Z" }, { "rule": "jQuery-wrap(", @@ -344,6 +363,22 @@ "reasonCategory": "falseMatch", "updated": "2018-09-19T18:13:29.628Z" }, + { + "rule": "jQuery-wrap(", + "path": "js/modules/types/conversation.js", + "line": " return dcodeIO.ByteBuffer.wrap(arraybuffer).toString('base64');", + "lineNumber": 12, + "reasonCategory": "falseMatch", + "updated": "2018-10-02T21:00:44.007Z" + }, + { + "rule": "jQuery-wrap(", + "path": "js/modules/types/conversation.js", + "line": " return dcodeIO.ByteBuffer.wrap(base64, 'base64').toArrayBuffer();", + "lineNumber": 16, + "reasonCategory": "falseMatch", + "updated": "2018-10-02T21:00:44.007Z" + }, { "rule": "jQuery-$(", "path": "js/permissions_popup_start.js", @@ -402,7 +437,7 @@ "rule": "jQuery-load(", "path": "js/signal_protocol_store.js", "line": " await ConversationController.load();", - "lineNumber": 966, + "lineNumber": 972, "reasonCategory": "falseMatch", "updated": "2018-09-15T00:38:04.183Z" }, @@ -426,7 +461,7 @@ "rule": "DOM-innerHTML", "path": "js/views/app_view.js", "line": " this.el.innerHTML = '';", - "lineNumber": 43, + "lineNumber": 36, "reasonCategory": "usageTrusted", "updated": "2018-09-15T00:38:04.183Z", "reasonDetail": "Hard-coded string" @@ -435,7 +470,7 @@ "rule": "jQuery-append(", "path": "js/views/app_view.js", "line": " this.el.append(view.el);", - "lineNumber": 44, + "lineNumber": 37, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -444,7 +479,7 @@ "rule": "jQuery-appendTo(", "path": "js/views/app_view.js", "line": " this.debugLogView.$el.appendTo(this.el);", - "lineNumber": 50, + "lineNumber": 43, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -498,10 +533,10 @@ "rule": "jQuery-append(", "path": "js/views/contact_list_view.js", "line": " this.$el.append(this.contactView.el);", - "lineNumber": 47, + "lineNumber": 44, "reasonCategory": "usageTrusted", - "updated": "2018-09-19T18:13:29.628Z", - "reasonDetail": "Interacting with already-existing DOM nodes" + "updated": "2018-10-02T21:18:39.026Z", + "reasonDetail": "Operating on previously-existing DOM elements" }, { "rule": "jQuery-append(", @@ -615,7 +650,7 @@ "rule": "jQuery-insertAfter(", "path": "js/views/conversation_search_view.js", "line": " this.hintView.$el.insertAfter(this.$input);", - "lineNumber": 163, + "lineNumber": 147, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -669,7 +704,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.conversation-header').append(this.titleView.el);", - "lineNumber": 203, + "lineNumber": 201, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -678,7 +713,7 @@ "rule": "jQuery-append(", "path": "js/views/conversation_view.js", "line": " this.$('.conversation-header').append(this.titleView.el);", - "lineNumber": 203, + "lineNumber": 201, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -687,7 +722,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.discussion-container').append(this.view.el);", - "lineNumber": 209, + "lineNumber": 207, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -696,7 +731,7 @@ "rule": "jQuery-append(", "path": "js/views/conversation_view.js", "line": " this.$('.discussion-container').append(this.view.el);", - "lineNumber": 209, + "lineNumber": 207, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -705,7 +740,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$messageField = this.$('.send-message');", - "lineNumber": 212, + "lineNumber": 210, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -714,7 +749,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.send-message').focus(this.focusBottomBar.bind(this));", - "lineNumber": 230, + "lineNumber": 228, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -723,7 +758,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$emojiPanelContainer = this.$('.emoji-panel-container');", - "lineNumber": 233, + "lineNumber": 231, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -732,7 +767,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " const container = this.$('.discussion-container');", - "lineNumber": 418, + "lineNumber": 416, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -741,7 +776,7 @@ "rule": "jQuery-append(", "path": "js/views/conversation_view.js", "line": " container.append(this.banner.el);", - "lineNumber": 419, + "lineNumber": 417, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -750,7 +785,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.send-message').val().length > 0 ||", - "lineNumber": 428, + "lineNumber": 426, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -759,7 +794,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.capture-audio').hide();", - "lineNumber": 431, + "lineNumber": 429, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -768,7 +803,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.capture-audio').show();", - "lineNumber": 433, + "lineNumber": 431, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -777,7 +812,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " if (this.$('.send-message').val().length > 2000) {", - "lineNumber": 437, + "lineNumber": 435, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -786,7 +821,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.android-length-warning').hide();", - "lineNumber": 440, + "lineNumber": 438, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -795,7 +830,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " view.$el.appendTo(this.$('.capture-audio'));", - "lineNumber": 460, + "lineNumber": 458, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -804,7 +839,7 @@ "rule": "jQuery-appendTo(", "path": "js/views/conversation_view.js", "line": " view.$el.appendTo(this.$('.capture-audio'));", - "lineNumber": 460, + "lineNumber": 458, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -813,7 +848,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.send-message').attr('disabled', true);", - "lineNumber": 462, + "lineNumber": 460, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -822,7 +857,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.bottom-bar form').submit();", - "lineNumber": 469, + "lineNumber": 467, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -831,7 +866,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.send-message').removeAttr('disabled');", - "lineNumber": 472, + "lineNumber": 470, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -840,7 +875,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.bottom-bar form').removeClass('active');", - "lineNumber": 478, + "lineNumber": 476, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -849,7 +884,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.bottom-bar form').addClass('active');", - "lineNumber": 481, + "lineNumber": 479, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -858,7 +893,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " const container = this.$('.discussion-container');", - "lineNumber": 568, + "lineNumber": 566, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -867,7 +902,7 @@ "rule": "jQuery-append(", "path": "js/views/conversation_view.js", "line": " container.append(this.scrollDownButton.el);", - "lineNumber": 569, + "lineNumber": 567, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -876,7 +911,7 @@ "rule": "jQuery-appendTo(", "path": "js/views/conversation_view.js", "line": " toast.$el.appendTo(this.$el);", - "lineNumber": 596, + "lineNumber": 594, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -885,7 +920,7 @@ "rule": "jQuery-appendTo(", "path": "js/views/conversation_view.js", "line": " toast.$el.appendTo(this.$el);", - "lineNumber": 629, + "lineNumber": 627, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -894,7 +929,7 @@ "rule": "jQuery-appendTo(", "path": "js/views/conversation_view.js", "line": " toast.$el.appendTo(this.$el);", - "lineNumber": 633, + "lineNumber": 631, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -903,7 +938,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " const el = this.$(`#${databaseId}`);", - "lineNumber": 640, + "lineNumber": 638, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -912,7 +947,7 @@ "rule": "jQuery-appendTo(", "path": "js/views/conversation_view.js", "line": " toast.$el.appendTo(this.$el);", - "lineNumber": 643, + "lineNumber": 641, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -921,7 +956,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " lastSeenEl.insertBefore(this.$(`#${oldestUnread.get('id')}`));", - "lineNumber": 805, + "lineNumber": 803, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -930,7 +965,7 @@ "rule": "jQuery-insertBefore(", "path": "js/views/conversation_view.js", "line": " lastSeenEl.insertBefore(this.$(`#${oldestUnread.get('id')}`));", - "lineNumber": 805, + "lineNumber": 803, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -939,7 +974,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.bar-container').show();", - "lineNumber": 860, + "lineNumber": 858, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -948,7 +983,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.bar-container').hide();", - "lineNumber": 872, + "lineNumber": 870, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -957,7 +992,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " const el = this.$(`#${message.id}`);", - "lineNumber": 969, + "lineNumber": 967, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -966,7 +1001,7 @@ "rule": "jQuery-prepend(", "path": "js/views/conversation_view.js", "line": " this.$el.prepend(dialog.el);", - "lineNumber": 1042, + "lineNumber": 1040, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -975,7 +1010,7 @@ "rule": "jQuery-prepend(", "path": "js/views/conversation_view.js", "line": " this.$el.prepend(dialog.el);", - "lineNumber": 1086, + "lineNumber": 1084, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -984,7 +1019,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " view.$el.insertBefore(this.$('.panel').first());", - "lineNumber": 1182, + "lineNumber": 1180, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -993,7 +1028,7 @@ "rule": "jQuery-insertBefore(", "path": "js/views/conversation_view.js", "line": " view.$el.insertBefore(this.$('.panel').first());", - "lineNumber": 1182, + "lineNumber": 1180, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1002,7 +1037,7 @@ "rule": "jQuery-prepend(", "path": "js/views/conversation_view.js", "line": " this.$el.prepend(dialog.el);", - "lineNumber": 1260, + "lineNumber": 1258, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1011,7 +1046,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.send').prepend(this.quoteView.el);", - "lineNumber": 1429, + "lineNumber": 1428, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1020,7 +1055,7 @@ "rule": "jQuery-prepend(", "path": "js/views/conversation_view.js", "line": " this.$('.send').prepend(this.quoteView.el);", - "lineNumber": 1429, + "lineNumber": 1428, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1029,7 +1064,7 @@ "rule": "jQuery-appendTo(", "path": "js/views/conversation_view.js", "line": " toast.$el.appendTo(this.$el);", - "lineNumber": 1452, + "lineNumber": 1451, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1038,7 +1073,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.bottom-bar form').submit();", - "lineNumber": 1498, + "lineNumber": 1497, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1047,7 +1082,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " const $attachmentPreviews = this.$('.attachment-previews');", - "lineNumber": 1507, + "lineNumber": 1506, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1056,7 +1091,7 @@ "rule": "jQuery-$(", "path": "js/views/conversation_view.js", "line": " this.$('.panel').css('display') === 'none'", - "lineNumber": 1538, + "lineNumber": 1537, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1262,7 +1297,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " let $el = this.$(`#${id}`);", - "lineNumber": 24, + "lineNumber": 26, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1271,7 +1306,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " $el.prependTo(this.el);", - "lineNumber": 33, + "lineNumber": 35, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1280,16 +1315,34 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.message').text(message);", - "lineNumber": 77, + "lineNumber": 79, "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": 97, + "lineNumber": 110, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1298,7 +1351,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " this.appLoadingScreen.$el.prependTo(this.el);", - "lineNumber": 104, + "lineNumber": 117, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1307,7 +1360,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " el: this.$('.inbox'),", - "lineNumber": 118, + "lineNumber": 131, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1316,7 +1369,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " el: this.$('.search-results'),", - "lineNumber": 134, + "lineNumber": 147, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1325,7 +1378,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " input: this.$('input.search'),", - "lineNumber": 135, + "lineNumber": 148, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1334,7 +1387,7 @@ "rule": "jQuery-append(", "path": "js/views/inbox_view.js", "line": " .append(this.networkStatusView.render().el);", - "lineNumber": 153, + "lineNumber": 166, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1343,7 +1396,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " banner.$el.prependTo(this.$el);", - "lineNumber": 161, + "lineNumber": 174, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1352,7 +1405,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " if (e && this.$(e.target).closest('.placeholder').length) {", - "lineNumber": 219, + "lineNumber": 232, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1361,43 +1414,43 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('#header, .gutter').addClass('inactive');", - "lineNumber": 223, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", - "reasonDetail": "Protected from arbitrary input" - }, - { - "rule": "jQuery-$(", - "path": "js/views/inbox_view.js", - "line": " this.$('.conversation-stack').addClass('inactive');", - "lineNumber": 227, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", - "reasonDetail": "Protected from arbitrary input" - }, - { - "rule": "jQuery-$(", - "path": "js/views/inbox_view.js", - "line": " this.$('.conversation:first .menu').trigger('close');", - "lineNumber": 229, - "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": 236, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" }, + { + "rule": "jQuery-$(", + "path": "js/views/inbox_view.js", + "line": " this.$('.conversation-stack').addClass('inactive');", + "lineNumber": 240, + "reasonCategory": "usageTrusted", + "updated": "2018-09-19T21:59:32.770Z", + "reasonDetail": "Protected from arbitrary input" + }, + { + "rule": "jQuery-$(", + "path": "js/views/inbox_view.js", + "line": " this.$('.conversation:first .menu').trigger('close');", + "lineNumber": 242, + "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": 249, + "reasonCategory": "usageTrusted", + "updated": "2018-09-19T21:59:32.770Z", + "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": 260, + "lineNumber": 273, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1406,7 +1459,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation:first .recorder').trigger('close');", - "lineNumber": 263, + "lineNumber": 276, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1710,10 +1763,10 @@ { "rule": "jQuery-$(", "path": "js/views/new_group_update_view.js", - "line": " name: this.$('.name').val(),", - "lineNumber": 66, + "line": " name: this.$('.name').val(),", + "lineNumber": 68, "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", + "updated": "2018-10-02T21:36:01.167Z", "reasonDetail": "Protected from arbitrary input" }, { @@ -1765,7 +1818,7 @@ "rule": "jQuery-$(", "path": "js/views/recipients_input_view.js", "line": " this.$input = this.$('input.search');", - "lineNumber": 67, + "lineNumber": 71, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1774,7 +1827,7 @@ "rule": "jQuery-$(", "path": "js/views/recipients_input_view.js", "line": " this.$new_contact = this.$('.new-contact');", - "lineNumber": 68, + "lineNumber": 72, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1783,7 +1836,7 @@ "rule": "jQuery-$(", "path": "js/views/recipients_input_view.js", "line": " el: this.$('.recipients'),", - "lineNumber": 78, + "lineNumber": 82, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1792,7 +1845,7 @@ "rule": "jQuery-$(", "path": "js/views/recipients_input_view.js", "line": " this.$('.contacts').append(this.typeahead_view.el);", - "lineNumber": 93, + "lineNumber": 97, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1801,7 +1854,7 @@ "rule": "jQuery-append(", "path": "js/views/recipients_input_view.js", "line": " this.$('.contacts').append(this.typeahead_view.el);", - "lineNumber": 93, + "lineNumber": 97, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -2218,7 +2271,7 @@ "rule": "jQuery-wrap(", "path": "libtextsecure/message_receiver.js", "line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);", - "lineNumber": 681, + "lineNumber": 688, "reasonCategory": "falseMatch", "updated": "2018-09-19T18:13:29.628Z" }, @@ -2226,7 +2279,7 @@ "rule": "jQuery-wrap(", "path": "libtextsecure/message_receiver.js", "line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);", - "lineNumber": 706, + "lineNumber": 713, "reasonCategory": "falseMatch", "updated": "2018-09-19T18:13:29.628Z" }, @@ -6712,4 +6765,4 @@ "updated": "2018-09-17T20:50:40.689Z", "reasonDetail": "Hard-coded value" } -] +] \ No newline at end of file diff --git a/ts/util/lint/linter.ts b/ts/util/lint/linter.ts index c274aadb9ef6..72581336521f 100644 --- a/ts/util/lint/linter.ts +++ b/ts/util/lint/linter.ts @@ -8,7 +8,7 @@ import glob from 'glob'; import { forEach, some, values } from 'lodash'; import { ExceptionType, REASONS, RuleType } from './types'; -import { ENCODING, loadJSON } from './util'; +import { ENCODING, loadJSON, sortExceptions } from './util'; const ALL_REASONS = REASONS.join('|'); const now = new Date(); @@ -254,12 +254,12 @@ if (results.length === 0 && unusedExceptions.length === 0) { console.log(); console.log('Questionable lines:'); -console.log(JSON.stringify(results, null, ' ')); +console.log(JSON.stringify(sortExceptions(results), null, ' ')); if (unusedExceptions.length) { console.log(); console.log('Unused exceptions!'); - console.log(JSON.stringify(unusedExceptions, null, ' ')); + console.log(JSON.stringify(sortExceptions(unusedExceptions), null, ' ')); } process.exit(1);