Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions apps/meteor/client/lib/e2ee/rocketchat.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import QueryString from 'querystring';
import URL from 'url';

import type { IE2EEMessage, IMessage, IRoom, IUser, IUploadWithUser, Serialized, IE2EEPinnedMessage } from '@rocket.chat/core-typings';
import { isE2EEMessage, isEncryptedMessageContent } from '@rocket.chat/core-typings';
import { Emitter } from '@rocket.chat/emitter';
Expand Down Expand Up @@ -731,15 +728,18 @@ class E2E extends Emitter {
return;
}

const urlObj = URL.parse(url);
// if the URL doesn't have query params (doesn't reference message) skip
if (!urlObj.query) {
// URLs come from regex-matched message content, so they may be malformed; skip those instead of throwing
let urlObj: URL;
try {
urlObj = new URL(url);
} catch (error) {
return;
}

const { msg: msgId } = QueryString.parse(urlObj.query);
const [msgId, ...extraMsgIds] = urlObj.searchParams.getAll('msg');

if (!msgId || Array.isArray(msgId)) {
// skip if the msg param is missing, empty, or duplicated
if (!msgId || extraMsgIds.length) {
return;
}

Expand Down
1 change: 0 additions & 1 deletion apps/meteor/imports/client/hepburn

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/limax

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/map-age-cleaner

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/mem

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/mimic-fn/index.js

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/p-defer

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/poly1305-js

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/query-string

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/scheduler

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/sodium-native

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/sodium-plus

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/split-on-first

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/imports/client/strict-uri-encode

This file was deleted.

Loading