Browse Source

Fixing of ldap.go

pull/1524/head
Yixin Hao 10 years ago
parent
commit
a525bcd1c2
  1. 3
      modules/auth/ldap/ldap.go

3
modules/auth/ldap/ldap.go

@ -42,6 +42,9 @@ func (ls Ldapsource) FindUserDN(name, passwd string) (string, bool) {
log.Trace("Search for LDAP user: %s", name)
if ls.BindDN != "" {
var bd, bp string
// With palceholder in BindDN and no password,
// It will bind as combination define in BindDN with login password
if ls.BindPassword == "" {
bd = strings.Replace(ls.BindDN, "<username>", name, -1)
bp = passwd

Loading…
Cancel
Save