Fixing wrong logging for security check.

This commit is contained in:
stephb9959
2021-10-15 09:22:32 -07:00
parent 1540df93e8
commit 796eed2e2f
2 changed files with 4 additions and 3 deletions

2
build
View File

@@ -1 +1 @@
49 50

View File

@@ -275,7 +275,8 @@ namespace OpenWifi {
ErrorObject.set("ErrorDescription","This resource does not exist."); ErrorObject.set("ErrorDescription","This resource does not exist.");
std::ostream &Answer = Response->send(); std::ostream &Answer = Response->send();
Poco::JSON::Stringifier::stringify(ErrorObject, Answer); 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()), Utils::FormatIPv6(Request->clientAddress().toString()),
Request->getMethod(), Request->getMethod(),
Request->getURI())); Request->getURI()));
@@ -410,8 +411,8 @@ namespace OpenWifi {
#endif #endif
if(Server_.LogIt(Request->getMethod(),true)) { if(Server_.LogIt(Request->getMethod(),true)) {
Logger_.debug(Poco::format("X-REQ-ALLOWED(%s): User='%s@%s' Method='%s' Path='%s", Logger_.debug(Poco::format("X-REQ-ALLOWED(%s): User='%s@%s' Method='%s' Path='%s",
Utils::FormatIPv6(Request->clientAddress().toString()),
UserInfo_.userinfo.email, UserInfo_.userinfo.email,
Utils::FormatIPv6(Request->clientAddress().toString()),
Request->clientAddress().toString(), Request->clientAddress().toString(),
Request->getMethod(), Request->getMethod(),
Request->getURI())); Request->getURI()));