GDrive: add optional encryption checkbox for backup files#5342
Open
altoch wants to merge 1 commit intoopnsense:masterfrom
Open
GDrive: add optional encryption checkbox for backup files#5342altoch wants to merge 1 commit intoopnsense:masterfrom
altoch wants to merge 1 commit intoopnsense:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important notices
Before you submit a pull request, we ask you kindly to acknowledge the following:
If AI was used, please disclose:
Related issue
No issue opened. The change is self-contained and the problem is described below.
Describe the problem
When the Password field is left empty in the Google Drive backup settings,
encrypt()fails silently because OpenSSL receives an empty password file. As a result,encrypt()returnsnull, which is passed directly to$client->upload(). The file is created on Google Drive with 0 bytes, and the UI still reports "Backup successful" with no indication of failure.Additionally, encryption should be opt-in. There are valid use cases where a user may not want to encrypt backups (e.g. private Shared Drives with restricted access), and forcing encryption without a clear UI option is inconsistent with the rest of the backup UI (Download and Restore sections already use an explicit encrypt/decrypt checkbox).
Describe the proposed solution
Added an optional "Encrypt backup files" checkbox to the Google Drive backup configuration, consistent with the existing Download and Restore UI patterns.
The comparison logic when checking for duplicate backups also respects the encryption setting, decrypting the previous backup only when encryption is enabled.