mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
backups: Don't send passphrase on the command line
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
1 parent
fa3e2ea86b
commit
dd5d93637f
4 files changed
+66
-85
No files matched your search
@@ -146,10 +146,7 @@ def _append_borg_arguments(arguments, credentials):
|
||||
kwargs = {}
|
||||
passphrase = credentials.get('encryption_passphrase', None)
|
||||
if passphrase:
|
||||
arguments += ['--encryption-passphrase', passphrase]
|
||||
|
||||
if 'ssh_password' in credentials and credentials['ssh_password']:
|
||||
kwargs['input'] = credentials['ssh_password'].encode()
|
||||
kwargs['input'] = json.dumps({'encryption_passphrase': passphrase})
|
||||
|
||||
if 'ssh_keyfile' in credentials and credentials['ssh_keyfile']:
|
||||
arguments += ['--ssh-keyfile', credentials['ssh_keyfile']]
|
||||
|
||||
Reference in new issue
Block a user