From 796eed2e2f34933dd0adb0fcc1cba6e52800be39 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Fri, 15 Oct 2021 09:22:32 -0700 Subject: [PATCH] Fixing wrong logging for security check. --- build | 2 +- src/RESTAPI_handler.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build b/build index 2e66562..c5b431b 100644 --- a/build +++ b/build @@ -1 +1 @@ -49 \ No newline at end of file +50 \ No newline at end of file diff --git a/src/RESTAPI_handler.cpp b/src/RESTAPI_handler.cpp index cc0b3b5..fcd9476 100644 --- a/src/RESTAPI_handler.cpp +++ b/src/RESTAPI_handler.cpp @@ -275,7 +275,8 @@ namespace OpenWifi { ErrorObject.set("ErrorDescription","This resource does not exist."); std::ostream &Answer = Response->send(); Poco::JSON::Stringifier::stringify(ErrorObject, Answer); - Logger_.debug(Poco::format("RES-NOTFOUND: User='%s' Method='%s' Path='%s", + Logger_.debug(Poco::format("RES-NOTFOUND: User='%s@%s' Method='%s' Path='%s", + UserInfo_.userinfo.email, Utils::FormatIPv6(Request->clientAddress().toString()), Request->getMethod(), Request->getURI())); @@ -410,8 +411,8 @@ namespace OpenWifi { #endif if(Server_.LogIt(Request->getMethod(),true)) { Logger_.debug(Poco::format("X-REQ-ALLOWED(%s): User='%s@%s' Method='%s' Path='%s", - Utils::FormatIPv6(Request->clientAddress().toString()), UserInfo_.userinfo.email, + Utils::FormatIPv6(Request->clientAddress().toString()), Request->clientAddress().toString(), Request->getMethod(), Request->getURI()));