Commit 965b59c9 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Change user matching to ignore wildcards on password failure.

parent 2e841c08
...@@ -308,7 +308,11 @@ type groupUser struct { ...@@ -308,7 +308,11 @@ type groupUser struct {
func matchUser(user, pass string, users []groupUser) (bool, bool) { func matchUser(user, pass string, users []groupUser) (bool, bool) {
for _, u := range users { 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) return true, (u.Password == "" || u.Password == pass)
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment