1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2025-02-26 16:12:35 +00:00

Remove filler password. By @samuel-w ()

This commit is contained in:
samuel-w 2021-01-18 02:05:25 -06:00 committed by GitHub
parent 7d7b7a2742
commit dae35bf4c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 9 deletions
src/vorta/borg

View file

@ -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

View file

@ -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.')