mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-23 05:27:30 +00:00
fix: 修复旧 ssh 私钥,解析失败的问题
This commit is contained in:
parent
62e5389f80
commit
a0151b8d44
@ -175,6 +175,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
Block a user