From 72c32e1c16b525a7bbbc702e0e941ab74e3fabff Mon Sep 17 00:00:00 2001 From: Chris Sexton <3216719+chrissexton@users.noreply.github.com> Date: Sun, 17 Jul 2022 14:08:14 -0400 Subject: [PATCH] counter: fix bug where anything but the right password worked --- plugins/counter/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/counter/api.go b/plugins/counter/api.go index 946783c..ef75bd3 100644 --- a/plugins/counter/api.go +++ b/plugins/counter/api.go @@ -205,7 +205,7 @@ func (p *CounterPlugin) handleCounterAPI(w http.ResponseWriter, r *http.Request) log.Debug(). Interface("postbody", info). Msg("Got a POST") - if p.b.CheckPassword("", info.Password) { + if !p.b.CheckPassword("", info.Password) { w.WriteHeader(http.StatusForbidden) j, _ := json.Marshal(struct{ Err string }{Err: "Invalid Password"}) w.Write(j)