fix: Push account failed

pull/16026/head
feng 2025-09-15 13:43:00 +08:00 committed by ZhaoJiSen
parent 863fe95100
commit 023952582e
4 changed files with 8 additions and 8 deletions

View File

@ -118,12 +118,10 @@ class BaseChangeSecretPushManager(AccountBasePlaybookManager):
if self.secret_type == SecretType.SSH_KEY:
host['error'] = _("Windows does not support SSH key authentication")
return host
if self.secret_strategy == SecretStrategy.custom:
new_secret = self.execution.snapshot['secret']
if '>' in new_secret or '^' in new_secret:
host['error'] = _("Windows password cannot contain special characters like > ^")
return host
new_secret = self.get_secret(account)
if '>' in new_secret or '^' in new_secret:
host['error'] = _("Windows password cannot contain special characters like > ^")
return host
host['ssh_params'] = {}

View File

@ -54,7 +54,7 @@ class LDAPSettingSerializer(LDAPSerializerMixin, serializers.Serializer):
help_text=_('Binding password')
)
AUTH_LDAP_SEARCH_OU = serializers.CharField(
max_length=1024, allow_blank=True, required=False, label=_('Search OU'),
max_length=4096, allow_blank=True, required=False, label=_('Search OU'),
help_text=_(
'User Search Base, if there are multiple OUs, you can separate them with the `|` symbol'
)

View File

@ -36,7 +36,7 @@ class LDAPHASettingSerializer(LDAPSerializerMixin, serializers.Serializer):
help_text=_('Binding password')
)
AUTH_LDAP_HA_SEARCH_OU = serializers.CharField(
max_length=1024, allow_blank=True, required=False, label=_('Search OU'),
max_length=4096, allow_blank=True, required=False, label=_('Search OU'),
help_text=_(
'User Search Base, if there are multiple OUs, you can separate them with the `|` symbol'
)

View File

@ -22,6 +22,7 @@ class EndpointSerializer(BulkModelSerializer):
'comment', 'date_created', 'date_updated', 'created_by'
]
extra_kwargs = {
'is_active': {'default': True},
'host': {'help_text': _(
'The host address accessed when connecting to assets, if it is empty, '
'the access address of the current browser will be used '
@ -71,5 +72,6 @@ class EndpointRuleSerializer(BulkModelSerializer):
'comment', 'date_created', 'date_updated', 'created_by', 'is_active'
]
extra_kwargs = {
'is_active': {'default': True},
'priority': {'default': 50}
}