From 3de0aaeec832b56a37405bd957e6c06014df937a Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Fri, 3 Jun 2022 19:56:07 +0200 Subject: [PATCH] fixed auth check thats why we test --- internal/web/web.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/web/web.go b/internal/web/web.go index c5ff90b..fba7d1d 100644 --- a/internal/web/web.go +++ b/internal/web/web.go @@ -193,13 +193,13 @@ func getShareHead(client *client.Client, w http.ResponseWriter, r *http.Request) } func checkAuth(w http.ResponseWriter, r *http.Request, username, password string) bool { - username, password, ok := r.BasicAuth() + authUsername, authPassword, ok := r.BasicAuth() if !ok { w.WriteHeader(http.StatusUnauthorized) return false } - if username != username || password != password { + if username != authUsername || password != authPassword { w.WriteHeader(http.StatusUnauthorized) return false }