From 965b59c9d5726c5201c57a6542f71a2de7a293b0 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 25 Apr 2020 19:08:14 +0200 Subject: [PATCH] Change user matching to ignore wildcards on password failure. --- group.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/group.go b/group.go index 47eba7f..b16e9c4 100644 --- a/group.go +++ b/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) } }