Skip to content

Commit

Permalink
ldap_auth: An empty password worked for any valid user
Browse files Browse the repository at this point in the history
  • Loading branch information
segevfiner committed Dec 23, 2016
1 parent b5b63d9 commit 655f41e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth_server/authn/ldap_auth.go
Expand Up @@ -54,7 +54,7 @@ func NewLDAPAuth(c *LDAPAuthConfig) (*LDAPAuth, error) {

//How to authenticate user, please refer to https://github.com/go-ldap/ldap/blob/master/example_test.go#L166
func (la *LDAPAuth) Authenticate(account string, password PasswordString) (bool, Labels, error) {
if account == "" {
if account == "" || password == "" {
return false, nil, NoMatch
}
l, err := la.ldapConnection()
Expand Down

0 comments on commit 655f41e

Please sign in to comment.