From b483f78d52ee494f2b36e1d2d4d19b00a196b851 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Fri, 26 Feb 2021 16:34:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(assets):=20=E7=B3=BB=E7=BB=9F=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=94=AF=E6=8C=81=20OPENSSH=20=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=A7=81=E9=92=A5=20(#5604)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(assets): 系统用户支持 OPENSSH 格式的私钥 * fix: 升级paramiko Co-authored-by: ibuler --- apps/assets/serializers/base.py | 4 ---- requirements/requirements.txt | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/assets/serializers/base.py b/apps/assets/serializers/base.py index c64b767e9..2159999c7 100644 --- a/apps/assets/serializers/base.py +++ b/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: diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 33306c712..aca226c97 100644 --- a/requirements/requirements.txt +++ b/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