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
10253725
Commit
10253725
authored
May 02, 2017
by
rithu leena john
Committed by
GitHub
May 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7 from rithujohn191/ldap-password-check
connector/ldap: check for blank passwords and return error.
parents
65318da8
58eee981
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 @
10253725
...
...
@@ -345,6 +345,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