Browse Source

fix(assets): 系统用户支持 OPENSSH 格式的私钥 (#5604)

* fix(assets): 系统用户支持 OPENSSH 格式的私钥

* fix: 升级paramiko

Co-authored-by: ibuler <ibuler@qq.com>
pull/5592/head^2
fit2bot 4 years ago committed by GitHub
parent
commit
b483f78d52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/assets/serializers/base.py
  2. 2
      requirements/requirements.txt

4
apps/assets/serializers/base.py

@ -41,10 +41,6 @@ class AuthSerializerMixin:
def validate_private_key(self, private_key):
if not private_key:
return
if 'OPENSSH' in private_key:
msg = _("Not support openssh format key, using "
"ssh-keygen -t rsa -m pem to generate")
raise serializers.ValidationError(msg)
password = self.initial_data.get("password")
valid = validate_ssh_private_key(private_key, password)
if not valid:

2
requirements/requirements.txt

@ -47,7 +47,7 @@ MarkupSafe==1.1.1
mysqlclient==2.0.1
olefile==0.44
openapi-codec==1.3.2
paramiko==2.4.2
paramiko==2.7.2
passlib==1.7.1
Pillow==7.1.0
pyasn1==0.4.8

Loading…
Cancel
Save