From fd41fd78cf4e21ece15017eb596cf048b60eba46 Mon Sep 17 00:00:00 2001 From: "Jiangjie.Bai" Date: Fri, 24 Jun 2022 18:41:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20private=5Fkey=20?= =?UTF-8?q?=E7=9A=84=E5=BA=8F=E5=88=97=E7=B1=BB=E9=95=BF=E5=BA=A6=E4=B8=BA?= =?UTF-8?q?=2016384?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/serializers/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/assets/serializers/base.py b/apps/assets/serializers/base.py index 2c5e579b6..92249705d 100644 --- a/apps/assets/serializers/base.py +++ b/apps/assets/serializers/base.py @@ -13,7 +13,7 @@ from .utils import validate_password_for_ansible class AuthSerializer(serializers.ModelSerializer): password = EncryptedField(required=False, allow_blank=True, allow_null=True, max_length=1024, label=_('Password')) - private_key = EncryptedField(required=False, allow_blank=True, allow_null=True, max_length=4096, label=_('Private key')) + private_key = EncryptedField(required=False, allow_blank=True, allow_null=True, max_length=16384, label=_('Private key')) def gen_keys(self, private_key=None, password=None): if private_key is None: @@ -38,7 +38,7 @@ class AuthSerializerMixin(serializers.ModelSerializer): validators=[validate_password_for_ansible] ) private_key = EncryptedField( - label=_('SSH private key'), required=False, allow_blank=True, allow_null=True, max_length=4096 + label=_('SSH private key'), required=False, allow_blank=True, allow_null=True, max_length=16384 ) passphrase = serializers.CharField( allow_blank=True, allow_null=True, required=False, max_length=512,