@@ -366,12 +366,19 sub is_member { | |||
|
366 | 366 | ); |
|
367 | 367 | $sthldap->execute($auth_source_id); |
|
368 | 368 | while (my @rowldap = $sthldap->fetchrow_array) { |
|
369 | my $bind_as = $rowldap[3] ? $rowldap[3] : ""; | |
|
370 | my $bind_pw = $rowldap[4] ? $rowldap[4] : ""; | |
|
371 | if ($bind_as =~ m/\$login/) { | |
|
372 | # replace $login with $redmine_user and use $redmine_pass | |
|
373 | $bind_as =~ s/\$login/$redmine_user/g; | |
|
374 | $bind_pw = $redmine_pass | |
|
375 | } | |
|
369 | 376 | my $ldap = Authen::Simple::LDAP->new( |
|
370 | 377 | host => ($rowldap[2] eq "1" || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]:$rowldap[1]" : $rowldap[0], |
|
371 | 378 | port => $rowldap[1], |
|
372 | 379 | basedn => $rowldap[5], |
|
373 |
binddn => $ |
|
|
374 |
bindpw => $ |
|
|
380 | binddn => $bind_as, | |
|
381 | bindpw => $bind_pw, | |
|
375 | 382 | filter => "(".$rowldap[6]."=%s)" |
|
376 | 383 | ); |
|
377 | 384 | my $method = $r->method; |
General Comments 0
You need to be logged in to leave comments.
Login now