From 6bb0fd8d77cf9fbbe792f80aa69c253098a5ffd7 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 22 Jul 2020 17:06:54 +0200 Subject: [PATCH] Don't log failed token authentication attempts into auth log --- urbackupserver/InternetServiceConnector.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/urbackupserver/InternetServiceConnector.cpp b/urbackupserver/InternetServiceConnector.cpp index 048d32bd..6d964e99 100644 --- a/urbackupserver/InternetServiceConnector.cpp +++ b/urbackupserver/InternetServiceConnector.cpp @@ -487,8 +487,12 @@ void InternetServiceConnector::ReceivePackets(IRunOtherCallback* run_other) CWData data; if(!errmsg.empty()) { - logFailedAuth(clientname, endpoint_name); - Server->Log("Authentication failed in InternetServiceConnector::ReceivePackets: "+errmsg, LL_INFO); + if (!token_auth) + { + logFailedAuth(clientname, endpoint_name); + } + Server->Log("Authentication failed in InternetServiceConnector::ReceivePackets: "+errmsg + + (token_auth ? " (token authentication)" :""), LL_INFO); data.addChar(ID_ISC_AUTH_FAILED); data.addString(errmsg); }