mirror of
https://github.com/borgbase/vorta
synced 2025-02-26 16:12:35 +00:00
Remove filler password. By @samuel-w (#752)
This commit is contained in:
parent
7d7b7a2742
commit
dae35bf4c7
2 changed files with 3 additions and 9 deletions
src/vorta/borg
|
@ -71,11 +71,7 @@ def __init__(self, cmd, params, parent=None):
|
|||
if 'additional_env' in params:
|
||||
env = {**env, **params['additional_env']}
|
||||
|
||||
password = params.get('password')
|
||||
if password is not None:
|
||||
env['BORG_PASSPHRASE'] = password
|
||||
else:
|
||||
env['BORG_PASSPHRASE'] = '9999999' # Set dummy password to avoid prompt.
|
||||
env['BORG_PASSPHRASE'] = params.get('password', '9999999') # Set dummy password to avoid prompt.
|
||||
|
||||
if env.get('BORG_PASSCOMMAND', False):
|
||||
env.pop('BORG_PASSPHRASE', None) # Unset passphrase
|
||||
|
|
|
@ -35,10 +35,8 @@ def prepare(cls, params):
|
|||
'BORG_RSH': 'ssh -oStrictHostKeyChecking=no'
|
||||
}
|
||||
|
||||
if params['password'] == '':
|
||||
ret['password'] = '999999' # Dummy password if the user didn't supply one. To avoid prompt.
|
||||
else:
|
||||
ret['password'] = params['password']
|
||||
ret['password'] = params['password'] # Empty password is '', which disables prompt
|
||||
if params['password'] != '':
|
||||
# Cannot tell if repo has encryption, assuming based off of password
|
||||
if not cls.keyring.is_unlocked:
|
||||
ret['message'] = trans_late('messages', 'Please unlock your password manager.')
|
||||
|
|
Loading…
Reference in a new issue