Avoid infinite loop
This commit is contained in:
parent
0035c63c22
commit
8d2adad509
|
@ -23,7 +23,7 @@ type LDAP struct {
|
||||||
// Returns (true, nil) if success
|
// Returns (true, nil) if success
|
||||||
func (a LDAP) Login(username string, password string) (bool, error) {
|
func (a LDAP) Login(username string, password string) (bool, error) {
|
||||||
// Resolve stream alias if necessary
|
// 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)
|
log.Printf("[LDAP] Use stream alias %s for username %s", username, aliasFor)
|
||||||
username = aliasFor
|
username = aliasFor
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue