Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
f62d7434
Commit
f62d7434
authored
Aug 05, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ldap): another fix for ldap and empty bindDN and bind password, #2339
parent
9dc77992
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
pkg/login/ldap.go
+6
-4
No files found.
pkg/login/ldap.go
View file @
f62d7434
...
...
@@ -14,8 +14,9 @@ import (
)
type
ldapAuther
struct
{
server
*
LdapServerConf
conn
*
ldap
.
Conn
server
*
LdapServerConf
conn
*
ldap
.
Conn
requireSecondBind
bool
}
func
NewLdapAuthenticator
(
server
*
LdapServerConf
)
*
ldapAuther
{
...
...
@@ -58,7 +59,7 @@ func (a *ldapAuther) login(query *LoginUserQuery) error {
}
// check if a second user bind is needed
if
a
.
server
.
BindPassword
!=
""
{
if
a
.
requireSecondBind
{
if
err
:=
a
.
secondBind
(
ldapUser
,
query
.
Password
);
err
!=
nil
{
return
err
}
...
...
@@ -204,8 +205,9 @@ func (a *ldapAuther) secondBind(ldapUser *ldapUserInfo, userPassword string) err
}
func
(
a
*
ldapAuther
)
initialBind
(
username
,
userPassword
string
)
error
{
if
a
.
server
.
BindPassword
!=
""
{
if
a
.
server
.
BindPassword
!=
""
||
a
.
server
.
BindDN
==
""
{
userPassword
=
a
.
server
.
BindPassword
a
.
requireSecondBind
=
true
}
bindPath
:=
a
.
server
.
BindDN
...
...
Write
Preview
Markdown
is supported
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