Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
464584c6
Commit
464584c6
authored
Dec 19, 2019
by
Francesc Guasch
Browse files
fix(auth): search in LDAP by uid and cn by default
parent
bccee0be
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/Auth/LDAP.pm
View file @
464584c6
...
...
@@ -415,7 +415,15 @@ sub _login_bind {
my
(
$username
,
$password
)
=
(
$self
->
name
,
$self
->
password
);
my
$found
=
0
;
for
my
$user
(
search_user
(
name
=>
$self
->
name
))
{
my
@user
;
if
(
exists
$$CONFIG
->
{
ldap
}
->
{
field
}
&&
defined
$$CONFIG
->
{
ldap
}
->
{
field
}
)
{
@user
=
search_user
(
name
=>
$self
->
name
);
}
else
{
@user
=
(
search_user
(
name
=>
$self
->
name
,
field
=>
'
uid
')
,
search_user
(
name
=>
$self
->
name
,
field
=>
'
cn
'));
}
for
my
$user
(
@user
)
{
my
$dn
=
$user
->
dn
;
$found
++
;
my
$mesg
=
$LDAP_ADMIN
->
bind
(
$dn
,
password
=>
$password
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment