From 10f0641e77dacc762a58a7cdb30faaf63cc94630 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Wed, 17 Jul 2024 09:35:00 -0400 Subject: [PATCH] add warning if auth token is unknown --- nksrv/IntlServer/IntlMsgHandler.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nksrv/IntlServer/IntlMsgHandler.cs b/nksrv/IntlServer/IntlMsgHandler.cs index d8d6252..79ba98a 100644 --- a/nksrv/IntlServer/IntlMsgHandler.cs +++ b/nksrv/IntlServer/IntlMsgHandler.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using nksrv.Utils; +using Swan.Logging; using System; using System.Collections.Generic; using System.Linq; @@ -60,12 +61,14 @@ namespace nksrv.IntlServer if (User == null) { + Logger.Warn("Unknown auth token"); await WriteJsonStringAsync("{\"msg\":\"expired verify_code!\",\"ret\":2022,\"seq\":\"" + Seq + "\"}\r\n"); return; } } else { + Logger.Warn("Failed to parse auth data"); await WriteJsonStringAsync("{\"msg\":\"expired verify_code!\",\"ret\":2022,\"seq\":\"" + Seq + "\"}\r\n"); return; }