mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-04 00:44:48 +00:00
fix: 修复旧 ssh 私钥,解析失败的问题
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user