From 626b81cec8f1d3d6d73268e43ffd77d6739346a0 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Mon, 8 Jan 2018 14:14:34 +0100 Subject: [PATCH] fix: printing ip addresses for unauthorized accesses --- modules/api_rest_routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/api_rest_routes.go b/modules/api_rest_routes.go index 5c187114..6d7985b3 100644 --- a/modules/api_rest_routes.go +++ b/modules/api_rest_routes.go @@ -17,7 +17,7 @@ func (api *RestAPI) setupRoutes() { func (api RestAPI) checkAuth(w http.ResponseWriter, r *http.Request) bool { if api.Authenticated(w, r) == false { - log.Warning("Unauthenticated access!") + log.Warning("Unauthorized request from %s", strings.SplitN(r.RemoteAddr, ":", 2)[0]) http.Error(w, "Not authorized", 401) return false }