From 2f14030194651bb44e74373bbe95eb1bb52c2c3b Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 12 May 2021 16:40:34 +1000 Subject: [PATCH 1/2] allow unpadded messages (#1625) * allow unpadded messages * bump to v1.6.1 * lint * Fix app image start for non-debian based distribs Fixes #1620 --- app/tray_icon.js | 8 +++++++- build/launcher-script.sh | 4 +++- package.json | 2 +- ts/components/session/SessionPasswordModal.tsx | 4 +--- ts/receiver/contentMessage.ts | 3 ++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/tray_icon.js b/app/tray_icon.js index 503174882..66489e6fd 100644 --- a/app/tray_icon.js +++ b/app/tray_icon.js @@ -9,7 +9,13 @@ let tray = null; function createTrayIcon(getMainWindow, messages) { // A smaller icon is needed on macOS const iconSize = process.platform === 'darwin' ? '16' : '256'; - const iconNoNewMessages = path.join(__dirname, '..', 'images', 'session', `session_icon_${iconSize}.png`); + const iconNoNewMessages = path.join( + __dirname, + '..', + 'images', + 'session', + `session_icon_${iconSize}.png` + ); tray = new Tray(iconNoNewMessages); diff --git a/build/launcher-script.sh b/build/launcher-script.sh index 8c4f3185b..644380a0d 100755 --- a/build/launcher-script.sh +++ b/build/launcher-script.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -set -e + +# do not set -x here because it will fail on non-debian based distrib +# set -e # Some distributions do not have unprivileged_userns_clone disabled. # If that's the case, and we run an AppImage (deb is not impacted by this), diff --git a/package.json b/package.json index 1e75c9e93..b97103489 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "session-desktop", "productName": "Session", "description": "Private messaging from your desktop", - "version": "1.6.0", + "version": "1.6.1", "license": "GPL-3.0", "author": { "name": "Loki Project", diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index bbe1bde16..24c2dd72a 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -208,9 +208,7 @@ class SessionPasswordModalInner extends React.Component { return; } - const isValidWithStoredInDB = Boolean( - await this.validatePasswordHash(oldPassword) - ); + const isValidWithStoredInDB = Boolean(await this.validatePasswordHash(oldPassword)); if (!isValidWithStoredInDB) { this.setState({ error: window.i18n('changePasswordInvalid'), diff --git a/ts/receiver/contentMessage.ts b/ts/receiver/contentMessage.ts index 137cb4dc2..b83f1c30c 100644 --- a/ts/receiver/contentMessage.ts +++ b/ts/receiver/contentMessage.ts @@ -200,7 +200,8 @@ export function unpad(paddedData: ArrayBuffer): ArrayBuffer { plaintext.set(paddedPlaintext.subarray(0, i)); return plaintext.buffer; } else if (paddedPlaintext[i] !== 0x00) { - throw new Error('Invalid padding'); + window.log.warn('got a message without padding... Letting it through for now'); + return paddedPlaintext; } } From 8ba0ab2d26d09aeb3e9b76be4a705519791be535 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 13 May 2021 13:37:26 +1000 Subject: [PATCH 2/2] disable draft release on pr to master (#1626) this is having a forbidden with publishing to github --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b09093d1..e7fdfd45b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,6 @@ on: push: branches: - master - pull_request: - branches: - - master jobs: build: