From e4244c5fc822400d63bd8f28c5d8235c01736539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 23 Feb 2026 14:49:03 +0100 Subject: [PATCH] fix(encryption): Improve type strictness on decryption check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise decrypting a falsy value like '0' would be seen as a decryption failure. Signed-off-by: Côme Chilliet --- apps/encryption/lib/Crypto/Crypt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php index f80daec728a4d..0aadd64eaec1d 100644 --- a/apps/encryption/lib/Crypto/Crypt.php +++ b/apps/encryption/lib/Crypto/Crypt.php @@ -545,7 +545,7 @@ private function decrypt(string $encryptedContent, string $iv, string $passPhras $options, $iv); - if ($plainContent) { + if ($plainContent !== false) { return $plainContent; } else { throw new DecryptionFailedException('Encryption library: Decryption (symmetric) of content failed: ' . openssl_error_string());