mirror of https://github.com/jumpserver/jumpserver
[Update] 修改小问题
parent
a5485011c8
commit
15b8a2efb9
|
@ -63,9 +63,8 @@ class Gateway(AssetUser):
|
||||||
def test_connective(self, local_port=None):
|
def test_connective(self, local_port=None):
|
||||||
if local_port is None:
|
if local_port is None:
|
||||||
local_port = self.port
|
local_port = self.port
|
||||||
if self.password is not None:
|
if self.password and not re.match(r'\w+$', self.password):
|
||||||
if not re.match(r'\w+$', self.password):
|
return False, _("Password should not contain special characters")
|
||||||
return False, _("Password should not contain special characters")
|
|
||||||
|
|
||||||
client = paramiko.SSHClient()
|
client = paramiko.SSHClient()
|
||||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
|
|
Loading…
Reference in New Issue