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 }