mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Merge branch 'master' into clearnet
This commit is contained in:
commit
27323a12f4
|
@ -2,7 +2,7 @@
|
||||||
"name": "session-desktop",
|
"name": "session-desktop",
|
||||||
"productName": "Session",
|
"productName": "Session",
|
||||||
"description": "Private messaging from your desktop",
|
"description": "Private messaging from your desktop",
|
||||||
"version": "1.5.3",
|
"version": "1.5.4",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Loki Project",
|
"name": "Loki Project",
|
||||||
|
|
|
@ -62,6 +62,7 @@ window.lokiFeatureFlags = {
|
||||||
useFileOnionRequestsV2: true, // more compact encoding of files in response
|
useFileOnionRequestsV2: true, // more compact encoding of files in response
|
||||||
onionRequestHops: 3,
|
onionRequestHops: 3,
|
||||||
useRequestEncryptionKeyPair: false,
|
useRequestEncryptionKeyPair: false,
|
||||||
|
padOutgoingAttachments: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -238,6 +238,13 @@ const processOnionResponse = async (
|
||||||
|
|
||||||
// FIXME: 401/500 handling?
|
// FIXME: 401/500 handling?
|
||||||
|
|
||||||
|
// detect SNode is deregisted?
|
||||||
|
if (response.status === 502) {
|
||||||
|
log.warn(`(${reqIdx}) [path] Got 502: snode not found`);
|
||||||
|
|
||||||
|
return RequestError.BAD_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
// detect SNode is not ready (not in swarm; not done syncing)
|
// detect SNode is not ready (not in swarm; not done syncing)
|
||||||
if (response.status === 503) {
|
if (response.status === 503) {
|
||||||
log.warn(`(${reqIdx}) [path] Got 503: snode not ready`);
|
log.warn(`(${reqIdx}) [path] Got 503: snode not ready`);
|
||||||
|
|
|
@ -94,9 +94,10 @@ export class AttachmentUtils {
|
||||||
pointer.key = new Uint8Array(crypto.randomBytes(64));
|
pointer.key = new Uint8Array(crypto.randomBytes(64));
|
||||||
const iv = new Uint8Array(crypto.randomBytes(16));
|
const iv = new Uint8Array(crypto.randomBytes(16));
|
||||||
|
|
||||||
const dataToEncrypt = !shouldPad
|
const dataToEncrypt =
|
||||||
? attachment.data
|
!shouldPad || !window.lokiFeatureFlags.padOutgoingAttachments
|
||||||
: AttachmentUtils.addAttachmentPadding(attachment.data);
|
? attachment.data
|
||||||
|
: AttachmentUtils.addAttachmentPadding(attachment.data);
|
||||||
const data = await window.textsecure.crypto.encryptAttachment(
|
const data = await window.textsecure.crypto.encryptAttachment(
|
||||||
dataToEncrypt,
|
dataToEncrypt,
|
||||||
pointer.key.buffer,
|
pointer.key.buffer,
|
||||||
|
|
1
ts/window.d.ts
vendored
1
ts/window.d.ts
vendored
|
@ -61,6 +61,7 @@ declare global {
|
||||||
useFileOnionRequestsV2: boolean;
|
useFileOnionRequestsV2: boolean;
|
||||||
onionRequestHops: number;
|
onionRequestHops: number;
|
||||||
useRequestEncryptionKeyPair: boolean;
|
useRequestEncryptionKeyPair: boolean;
|
||||||
|
padOutgoingAttachments: boolean;
|
||||||
};
|
};
|
||||||
lokiFileServerAPI: LokiFileServerInstance;
|
lokiFileServerAPI: LokiFileServerInstance;
|
||||||
lokiMessageAPI: LokiMessageInterface;
|
lokiMessageAPI: LokiMessageInterface;
|
||||||
|
|
Loading…
Reference in a new issue