Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
6e3e1741
Commit
6e3e1741
authored
Apr 28, 2017
by
rithu john
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
connector/ldap: check for blank passwords and return error.
parent
81d24f18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
ldap.go
connector/ldap/ldap.go
+5
-0
No files found.
connector/ldap/ldap.go
View file @
6e3e1741
...
...
@@ -359,6 +359,11 @@ func (c *ldapConnector) userEntry(conn *ldap.Conn, username string) (user ldap.E
}
func
(
c
*
ldapConnector
)
Login
(
ctx
context
.
Context
,
s
connector
.
Scopes
,
username
,
password
string
)
(
ident
connector
.
Identity
,
validPass
bool
,
err
error
)
{
// make this check to avoid anonymous bind to the LDAP server.
if
password
==
""
{
return
connector
.
Identity
{},
false
,
nil
}
var
(
// We want to return a different error if the user's password is incorrect vs
// if there was an error.
...
...
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