diff --git a/apps/accounts/automations/base/manager.py b/apps/accounts/automations/base/manager.py index 65474dea6..382ec0e17 100644 --- a/apps/accounts/automations/base/manager.py +++ b/apps/accounts/automations/base/manager.py @@ -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'] = {} diff --git a/apps/settings/serializers/auth/ldap.py b/apps/settings/serializers/auth/ldap.py index 06a856c62..407a18fd1 100644 --- a/apps/settings/serializers/auth/ldap.py +++ b/apps/settings/serializers/auth/ldap.py @@ -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' ) diff --git a/apps/settings/serializers/auth/ldap_ha.py b/apps/settings/serializers/auth/ldap_ha.py index 3f3acd187..c0efaab56 100644 --- a/apps/settings/serializers/auth/ldap_ha.py +++ b/apps/settings/serializers/auth/ldap_ha.py @@ -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' ) diff --git a/apps/terminal/serializers/endpoint.py b/apps/terminal/serializers/endpoint.py index 5ece73ab3..69288316c 100644 --- a/apps/terminal/serializers/endpoint.py +++ b/apps/terminal/serializers/endpoint.py @@ -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} }