From 09f316dcfc952fc372599d53bf67526fef912618 Mon Sep 17 00:00:00 2001 From: alex-z Date: Fri, 17 Mar 2023 16:04:43 +0100 Subject: [PATCH] E2EE cut extra zeroes from derypted byte array. Signed-off-by: alex-z --- src/libsync/clientsideencryption.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libsync/clientsideencryption.cpp b/src/libsync/clientsideencryption.cpp index 1eb7a9bd98ac5..0bc507d1a91f7 100644 --- a/src/libsync/clientsideencryption.cpp +++ b/src/libsync/clientsideencryption.cpp @@ -806,6 +806,9 @@ QByteArray decryptStringAsymmetric(EVP_PKEY *privateKey, const QByteArray& data) qCInfo(lcCseDecryption()) << "data decrypted successfully"; } + // we don't need extra zeroes in out, so let's only return meaningful data + out = QByteArray(out.constData(), outlen); + qCInfo(lcCse()) << out; return out; }