Avoid infinite loop

This commit is contained in:
Yohann D'ANELLO 2020-12-06 13:41:17 +01:00
parent 0035c63c22
commit 8d2adad509
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ type LDAP struct {
// Returns (true, nil) if success
func (a LDAP) Login(username string, password string) (bool, error) {
// Resolve stream alias if necessary
for aliasFor, ok := a.Cfg.Aliases[username]; ok; {
for aliasFor, ok := a.Cfg.Aliases[username]; ok; aliasFor, ok = a.Cfg.Aliases[username] {
log.Printf("[LDAP] Use stream alias %s for username %s", username, aliasFor)
username = aliasFor
}