From d7b6cdb8a1b29341f6a98ce9440f840203bc6cbd Mon Sep 17 00:00:00 2001 From: evilsocket Date: Tue, 19 Mar 2019 00:40:28 +0100 Subject: [PATCH] fix: printing path for unauthorized attempts to request api.rest routes --- modules/api_rest/api_rest_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/api_rest/api_rest_controller.go b/modules/api_rest/api_rest_controller.go index e9765f19..2e03bfc8 100644 --- a/modules/api_rest/api_rest_controller.go +++ b/modules/api_rest/api_rest_controller.go @@ -22,7 +22,7 @@ type APIResponse struct { } func (mod *RestAPI) setAuthFailed(w http.ResponseWriter, r *http.Request) { - mod.Warning("Unauthorized authentication attempt from %s", r.RemoteAddr) + mod.Warning("Unauthorized authentication attempt from %s to %s", r.RemoteAddr, r.URL.String()) w.Header().Set("WWW-Authenticate", `Basic realm="auth"`) w.WriteHeader(401)