Ignore sync contexts on messages not from ourselves
But process the rest of the message normally.
This commit is contained in:
parent
fdd2eb0d3e
commit
7e8b1319a5
2 changed files with 8 additions and 4 deletions
|
@ -38741,8 +38741,10 @@ textsecure.processDecrypted = function(decrypted, source) {
|
|||
if (decrypted.flags == null)
|
||||
decrypted.flags = 0;
|
||||
|
||||
if (decrypted.sync !== null && textsecure.storage.user.getNumber() != source)
|
||||
throw new Error("Got sync context on a message not from a peer device");
|
||||
if (decrypted.sync !== null && textsecure.storage.user.getNumber() != source) {
|
||||
// Ignore erroneous or malicious sync context from different number
|
||||
decrypted.sync = null;
|
||||
}
|
||||
|
||||
if ((decrypted.flags & textsecure.protobuf.PushMessageContent.Flags.END_SESSION)
|
||||
== textsecure.protobuf.PushMessageContent.Flags.END_SESSION) {
|
||||
|
|
|
@ -156,8 +156,10 @@ textsecure.processDecrypted = function(decrypted, source) {
|
|||
if (decrypted.flags == null)
|
||||
decrypted.flags = 0;
|
||||
|
||||
if (decrypted.sync !== null && textsecure.storage.user.getNumber() != source)
|
||||
throw new Error("Got sync context on a message not from a peer device");
|
||||
if (decrypted.sync !== null && textsecure.storage.user.getNumber() != source) {
|
||||
// Ignore erroneous or malicious sync context from different number
|
||||
decrypted.sync = null;
|
||||
}
|
||||
|
||||
if ((decrypted.flags & textsecure.protobuf.PushMessageContent.Flags.END_SESSION)
|
||||
== textsecure.protobuf.PushMessageContent.Flags.END_SESSION) {
|
||||
|
|
Loading…
Reference in a new issue