Add more safeguards to isTrustedIdentity
This commit is contained in:
parent
896dfcb43f
commit
1b5c36a9a8
2 changed files with 6 additions and 4 deletions
|
@ -501,9 +501,11 @@
|
||||||
throw new Error('Tried to get identity key for undefined/null key');
|
throw new Error('Tried to get identity key for undefined/null key');
|
||||||
}
|
}
|
||||||
const identifier = textsecure.utils.unencodeNumber(encodedAddress)[0];
|
const identifier = textsecure.utils.unencodeNumber(encodedAddress)[0];
|
||||||
|
const ourNumber = textsecure.storage.user.getNumber();
|
||||||
|
const ourUuid = textsecure.storage.user.getUuid();
|
||||||
const isOurIdentifier =
|
const isOurIdentifier =
|
||||||
identifier === textsecure.storage.user.getNumber() ||
|
(ourNumber && identifier === ourNumber) ||
|
||||||
identifier === textsecure.storage.user.getUuid();
|
(ourUuid && identifier === ourUuid);
|
||||||
|
|
||||||
const identityRecord = this.getIdentityRecord(identifier);
|
const identityRecord = this.getIdentityRecord(identifier);
|
||||||
|
|
||||||
|
|
|
@ -317,9 +317,9 @@
|
||||||
"rule": "jQuery-load(",
|
"rule": "jQuery-load(",
|
||||||
"path": "js/signal_protocol_store.js",
|
"path": "js/signal_protocol_store.js",
|
||||||
"line": " await ConversationController.load();",
|
"line": " await ConversationController.load();",
|
||||||
"lineNumber": 983,
|
"lineNumber": 985,
|
||||||
"reasonCategory": "falseMatch",
|
"reasonCategory": "falseMatch",
|
||||||
"updated": "2020-02-28T18:14:42.951Z"
|
"updated": "2020-04-27T20:02:20.424Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rule": "DOM-innerHTML",
|
"rule": "DOM-innerHTML",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue