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);