Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
18.1 Legacy Series
»
Edit LDAP Users: "The username contains invalid characters" when using an AD UPN
« previous
next »
Print
Pages: [
1
]
Author
Topic: Edit LDAP Users: "The username contains invalid characters" when using an AD UPN (Read 3039 times)
nantoine555
Newbie
Posts: 3
Karma: 1
Edit LDAP Users: "The username contains invalid characters" when using an AD UPN
«
on:
March 05, 2018, 11:55:19 am »
Hello,
We are importing users from an Active Directory.
In the LDAP configuration, the User naming attribute is userPrincipalName, so the Usernames are in UPN form (user@domain.com).
First import from LDAP is fine, but we are unable to edit and save users:
"The username contains invalid characters"
I think it is only a html form validation issue, but are any other issues when a username contains "@" and "." characters?
Thanks, and keep doing such a fine job
Antoine
Logged
nantoine555
Newbie
Posts: 3
Karma: 1
Re: Edit LDAP Users: "The username contains invalid characters" when using an AD UPN
«
Reply #1 on:
March 05, 2018, 02:32:54 pm »
Ok, opening an issue on github, found the following code:
if (preg_match("/[^a-zA-Z0-9\.\-_]/", $pconfig['usernamefld'])) {
$input_errors[] = gettext("The username contains invalid characters.");
}
if (strlen($pconfig['usernamefld']) > 32) {
$input_errors[] = gettext("The username is longer than 32 characters.");
}
Logged
franco
Administrator
Hero Member
Posts: 17210
Karma: 1566
Re: Edit LDAP Users: "The username contains invalid characters" when using an AD UPN
«
Reply #2 on:
March 06, 2018, 01:03:49 pm »
Likely solved via
https://github.com/opnsense/core/issues/2242
Logged
nantoine555
Newbie
Posts: 3
Karma: 1
Re: Edit LDAP Users: "The username contains invalid characters" when using an AD UPN
«
Reply #3 on:
March 06, 2018, 07:30:50 pm »
I'll just have to explain to my users that they'll have to enter their windows account and not their email when login to the vpn
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
18.1 Legacy Series
»
Edit LDAP Users: "The username contains invalid characters" when using an AD UPN