mirror of
https://github.com/jech/galene.git
synced 2024-11-09 18:25:58 +01:00
Change user matching to ignore wildcards on password failure.
This commit is contained in:
parent
2e841c082e
commit
965b59c9d5
1 changed files with 5 additions and 1 deletions
6
group.go
6
group.go
|
@ -308,7 +308,11 @@ type groupUser struct {
|
|||
|
||||
func matchUser(user, pass string, users []groupUser) (bool, bool) {
|
||||
for _, u := range users {
|
||||
if u.Username == "" || u.Username == user {
|
||||
if u.Username == "" {
|
||||
if u.Password == "" || u.Password == pass {
|
||||
return true, true
|
||||
}
|
||||
} else if u.Username == user {
|
||||
return true, (u.Password == "" || u.Password == pass)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue