From 6aa978d5e94cad97d055cc7e1b629e7a1b3f0e03 Mon Sep 17 00:00:00 2001 From: matias-portainer <104775949+matias-portainer@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:18:21 -0300 Subject: [PATCH] fix(authentication): allow whitespaces when loading AD OU name EE-5206 (#9978) --- .../ldap-settings-dn-builder.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/portainer/settings/authentication/ldap/ldap-settings-dn-builder/ldap-settings-dn-builder.controller.js b/app/portainer/settings/authentication/ldap/ldap-settings-dn-builder/ldap-settings-dn-builder.controller.js index 4b829967a..2c15638f8 100644 --- a/app/portainer/settings/authentication/ldap/ldap-settings-dn-builder/ldap-settings-dn-builder.controller.js +++ b/app/portainer/settings/authentication/ldap/ldap-settings-dn-builder/ldap-settings-dn-builder.controller.js @@ -41,7 +41,7 @@ export default class LdapSettingsBaseDnBuilderController { } getOUValues(dn, domainSuffix = '') { - const regex = /(\w+)=(\w*),?/; + const regex = /(\w+)=([a-zA-Z0-9_ ]*),?/; let ouValues = []; let left = dn; let match = left.match(regex);