mirror of https://github.com/jumpserver/jumpserver
fix: 修复旧 ssh 私钥,解析失败的问题
parent
17e3ddda05
commit
a0994e2e12
|
@ -173,6 +173,8 @@ def _parse_ssh_private_key(text, password=None):
|
|||
dsa.DSAPrivateKey,
|
||||
ed25519.Ed25519PrivateKey,
|
||||
"""
|
||||
if not bool(password):
|
||||
password = None
|
||||
if isinstance(text, str):
|
||||
try:
|
||||
text = text.encode("utf-8")
|
||||
|
|
Loading…
Reference in New Issue