phpbu
phpbu copied to clipboard
Large database silent encryption failure
OpenSSL SMIME cannot decrypt files over 1.5GB and encryption truncates at 1.9GB. See https://github.com/openssl/openssl/issues/2515.
Unfortunately it fails silently (returning 0) when encrypting in both these situations, causing PHPBU to continue and log a success where the backup is actually corrupt.
Luckily, we discovered this issue during a disaster recovery fire-drill rather than a real fire.
Suggested actions:
- Update the documentation to warn about the limit
- Consider replacing the OpenSSL crypter, perhaps with a Halite/libsodium based crypter.
Thanks for bringing this to my attention, I will update the documentation and see how the backup can be failed.
Please let me know if you need anything from me. This undocumented "feature" of OpenSSL SMIME has affected other DB backup tools too. I'm quite surprised they haven't tackled it since it was reported 5 years ago.