MessageReceiver: Drop messages with GroupContextV2
This commit is contained in:
parent
b7d56def82
commit
97a6e01d24
5 changed files with 31 additions and 89 deletions
|
@ -193,6 +193,7 @@ message DataMessage {
|
|||
optional string body = 1;
|
||||
repeated AttachmentPointer attachments = 2;
|
||||
optional GroupContext group = 3;
|
||||
optional GroupContextV2 groupV2 = 15;
|
||||
optional uint32 flags = 4;
|
||||
optional uint32 expireTimer = 5;
|
||||
optional bytes profileKey = 6;
|
||||
|
@ -371,6 +372,12 @@ message GroupContext {
|
|||
optional AttachmentPointer avatar = 5;
|
||||
}
|
||||
|
||||
message GroupContextV2 {
|
||||
optional bytes masterKey = 1;
|
||||
optional uint32 revision = 2;
|
||||
optional bytes groupChange = 3;
|
||||
}
|
||||
|
||||
message ContactDetails {
|
||||
message Avatar {
|
||||
optional string contentType = 1;
|
||||
|
|
13
ts/textsecure.d.ts
vendored
13
ts/textsecure.d.ts
vendored
|
@ -126,6 +126,7 @@ type ProtobufCollectionType = {
|
|||
DeviceName: typeof DeviceNameClass;
|
||||
Envelope: typeof EnvelopeClass;
|
||||
GroupContext: typeof GroupContextClass;
|
||||
GroupContextV2: typeof GroupContextV2Class;
|
||||
GroupDetails: typeof GroupDetailsClass;
|
||||
NullMessage: typeof NullMessageClass;
|
||||
ProvisioningUuid: typeof ProvisioningUuidClass;
|
||||
|
@ -216,6 +217,7 @@ export declare class DataMessageClass {
|
|||
body?: string | null;
|
||||
attachments?: Array<AttachmentPointerClass>;
|
||||
group?: GroupContextClass | null;
|
||||
groupV2?: GroupContextV2Class | null;
|
||||
flags?: number;
|
||||
expireTimer?: number;
|
||||
profileKey?: ProtoBinaryType;
|
||||
|
@ -355,6 +357,17 @@ export declare class GroupContextClass {
|
|||
avatar?: AttachmentPointerClass | null;
|
||||
}
|
||||
|
||||
export declare class GroupContextV2Class {
|
||||
static decode: (
|
||||
data: ArrayBuffer | ByteBufferClass,
|
||||
encoding?: string
|
||||
) => GroupContextV2Class;
|
||||
|
||||
masterKey?: ProtoBinaryType;
|
||||
revision?: number;
|
||||
groupChange?: ProtoBinaryType;
|
||||
}
|
||||
|
||||
// Note: we need to use namespaces to express nested classes in Typescript
|
||||
export declare namespace GroupContextClass {
|
||||
class Member {
|
||||
|
|
|
@ -1107,6 +1107,14 @@ class MessageReceiverInner extends EventTarget {
|
|||
);
|
||||
}
|
||||
|
||||
if (msg.groupV2) {
|
||||
window.log.warn(
|
||||
'MessageReceiver.handleDataMessage: Dropping GroupsV2 message'
|
||||
);
|
||||
this.removeFromCache(envelope);
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
msg.flags &&
|
||||
msg.flags & window.textsecure.protobuf.DataMessage.Flags.END_SESSION
|
||||
|
|
|
@ -11561,94 +11561,6 @@
|
|||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.js",
|
||||
"line": " const buffer = window.dcodeIO.ByteBuffer.wrap(ciphertext);",
|
||||
"lineNumber": 665,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.js",
|
||||
"line": " const buffer = window.dcodeIO.ByteBuffer.wrap(ciphertext);",
|
||||
"lineNumber": 685,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.js",
|
||||
"line": "MessageReceiverInner.stringToArrayBuffer = (string) => window.dcodeIO.ByteBuffer.wrap(string, 'binary').toArrayBuffer();",
|
||||
"lineNumber": 1253,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.js",
|
||||
"line": "MessageReceiverInner.arrayBufferToString = (arrayBuffer) => window.dcodeIO.ByteBuffer.wrap(arrayBuffer).toString('binary');",
|
||||
"lineNumber": 1254,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.js",
|
||||
"line": "MessageReceiverInner.arrayBufferToStringBase64 = (arrayBuffer) => window.dcodeIO.ByteBuffer.wrap(arrayBuffer).toString('base64');",
|
||||
"lineNumber": 1256,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.ts",
|
||||
"line": " window.dcodeIO.ByteBuffer.wrap(string, 'binary').toArrayBuffer();",
|
||||
"lineNumber": 179,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.ts",
|
||||
"line": " window.dcodeIO.ByteBuffer.wrap(arrayBuffer).toString('binary');",
|
||||
"lineNumber": 181,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.ts",
|
||||
"line": " window.dcodeIO.ByteBuffer.wrap(string, 'base64').toArrayBuffer();",
|
||||
"lineNumber": 183,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.ts",
|
||||
"line": " window.dcodeIO.ByteBuffer.wrap(arrayBuffer).toString('base64');",
|
||||
"lineNumber": 185,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.ts",
|
||||
"line": " const buffer = window.dcodeIO.ByteBuffer.wrap(ciphertext);",
|
||||
"lineNumber": 987,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/MessageReceiver.ts",
|
||||
"line": " const buffer = window.dcodeIO.ByteBuffer.wrap(ciphertext);",
|
||||
"lineNumber": 1016,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
},
|
||||
{
|
||||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/SendMessage.js",
|
||||
|
@ -11745,4 +11657,4 @@
|
|||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-05T23:45:16.746Z"
|
||||
}
|
||||
]
|
||||
]
|
|
@ -58,6 +58,8 @@ const excludedFiles = [
|
|||
'^js/background.js',
|
||||
'^ts/Crypto.js',
|
||||
'^ts/Crypto.ts',
|
||||
'^ts/textsecure/MessageReceiver.js',
|
||||
'^ts/textsecure/MessageReceiver.ts',
|
||||
|
||||
// Generated files
|
||||
'^js/components.js',
|
||||
|
|
Loading…
Reference in a new issue