1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 11:32:19 +00:00

Avoid infinite loop

This commit is contained in:
Yohann D'ANELLO 2020-12-06 13:41:17 +01:00
parent 0035c63c22
commit 8d2adad509

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
}