Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3151860
D12044.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12044.diff
View Options
diff --git a/web/shared-worker/worker/worker-crypto.js b/web/shared-worker/worker/worker-crypto.js
--- a/web/shared-worker/worker/worker-crypto.js
+++ b/web/shared-worker/worker/worker-crypto.js
@@ -430,11 +430,11 @@
if (!cryptoStore) {
throw new Error('Crypto account not initialized');
}
- const { session } = cryptoStore.contentSessions[deviceID];
- if (!session) {
+ const olmSession = cryptoStore.contentSessions[deviceID];
+ if (!olmSession) {
throw new Error(`No session for deviceID: ${deviceID}`);
}
- const encryptedContent = session.encrypt(content);
+ const encryptedContent = olmSession.session.encrypt(content);
persistCryptoStore();
@@ -451,12 +451,12 @@
throw new Error('Crypto account not initialized');
}
- const { session } = cryptoStore.contentSessions[deviceID];
- if (!session) {
+ const olmSession = cryptoStore.contentSessions[deviceID];
+ if (!olmSession) {
throw new Error(`No session for deviceID: ${deviceID}`);
}
- const result = session.decrypt(
+ const result = olmSession.session.decrypt(
encryptedData.messageType,
encryptedData.message,
);
@@ -474,12 +474,12 @@
throw new Error('Crypto account not initialized');
}
- const { session } = cryptoStore.contentSessions[deviceID];
- if (!session) {
+ const olmSession = cryptoStore.contentSessions[deviceID];
+ if (!olmSession) {
throw new Error(`No session for deviceID: ${deviceID}`);
}
- const result = session.decrypt_sequential(
+ const result = olmSession.session.decrypt_sequential(
encryptedData.messageType,
encryptedData.message,
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 3:29 AM (21 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2427860
Default Alt Text
D12044.diff (1 KB)
Attached To
Mode
D12044: [web] improve handling of non-existing olm sessions
Attached
Detach File
Event Timeline
Log In to Comment