aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-14 12:24:37 -0400
committerUnknwon <u@gogs.io>2015-09-14 12:24:37 -0400
commit2bc3e83e1ce89a6c250116216a93da3a401127db (patch)
tree7706af743687658b713f809f1063e519ec99b434 /modules
parentd600530c201339818ccf329ddce21bfeff82f798 (diff)
downloadgitea-2bc3e83e1ce89a6c250116216a93da3a401127db.tar.gz
gitea-2bc3e83e1ce89a6c250116216a93da3a401127db.zip
fix simple LDAP userDN
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/ldap/ldap.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go
index 61cfca90b5..3e6f9731c1 100644
--- a/modules/auth/ldap/ldap.go
+++ b/modules/auth/ldap/ldap.go
@@ -82,8 +82,8 @@ func (ls Ldapsource) FindUserDN(name string) (string, bool) {
func (ls Ldapsource) SearchEntry(name, passwd string, directBind bool) (string, string, string, bool, bool) {
var userDN string
if directBind {
- log.Trace("LDAP will bind directly via UserDN template: %s", ls.UserDN)
- userDN = fmt.Sprintf(ls.UserDN, name)
+ log.Trace("LDAP will bind directly via UserDN: %s", ls.UserDN)
+ userDN = ls.UserDN
} else {
log.Trace("LDAP will use BindDN.")
@@ -100,7 +100,6 @@ func (ls Ldapsource) SearchEntry(name, passwd string, directBind bool) (string,
ls.Enabled = false
return "", "", "", false, false
}
-
defer l.Close()
log.Trace("Binding with userDN: %s", userDN)