Support SSH tunneling with keys that don't have a passphrase. Fixes #3468

This commit is contained in:
Akshay Joshi
2018-07-18 14:14:56 +01:00
committed by Dave Page
parent 7f7feee8c1
commit ce768c7f8a
4 changed files with 23 additions and 17 deletions

View File

@@ -782,7 +782,7 @@ class ServerNode(PGChildNodeView):
have_password = False
password = None
passfile = None
tunnel_password = None
tunnel_password = ''
if 'password' in data and data["password"] != '':
# login with password
have_password = True
@@ -973,7 +973,7 @@ class ServerNode(PGChildNodeView):
return self.get_response_for_password(server, 428)
else:
tunnel_password = data['tunnel_password'] if 'tunnel_password'\
in data else None
in data else ''
# Encrypt the password before saving with user's login
# password key.
try: