Skip to content

Commit

Permalink
Trim space from LDAP password before use
Browse files Browse the repository at this point in the history
Makes it editor-friendly.
  • Loading branch information
rojer committed Oct 12, 2015
1 parent b9c198a commit 1736d6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions auth_server/authn/ldap_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ func (la *LDAPAuth) bindReadOnlyUser(l *ldap.Conn) error {
if err != nil {
return err
}
glog.V(2).Infof("Bind read-only user %s", string(password))
err = l.Bind(la.config.BindDN, string(password))
password_str := strings.TrimSpace(string(password))
glog.V(2).Infof("Bind read-only user %s", password_str)
err = l.Bind(la.config.BindDN, password_str)
if err != nil {
return err
}
Expand Down

0 comments on commit 1736d6c

Please sign in to comment.