From c22ff226aa209f2a9210ae5e308fabc910c0f4c8 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Wed, 13 Aug 2025 12:03:24 +0530 Subject: [PATCH] fix(restore): check for `AES` instead of `cipher` to detect encrypted backup Seems more consistent, have seen the following outputs with `file`: - GPG symmetrically encrypted data (AES256 cipher) - PGP symmetric key encrypted data - AES with 256-bit key salted & iterated - SHA512 . Signed-off-by: Akhil Narang --- frappe/commands/site.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/commands/site.py b/frappe/commands/site.py index 0ed16de97b..f0a3ea24e6 100644 --- a/frappe/commands/site.py +++ b/frappe/commands/site.py @@ -225,7 +225,7 @@ def _restore( click.secho("Failed to detect type of backup file", fg="red") sys.exit(1) - if "cipher" in out.decode().split(":")[-1].strip(): + if "AES" in out.decode().split(":")[-1].strip(): if encryption_key: click.secho("Encrypted backup file detected. Decrypting using provided key.", fg="yellow")