From 6ddbb41617dc5dc8eb9437e75ca06f63df5eec58 Mon Sep 17 00:00:00 2001 From: JJ <3617814+joligario@users.noreply.github.com> Date: Sat, 21 Oct 2023 13:33:24 -0400 Subject: [PATCH] [Bug Fix] Verifying mail keys when none exist (#3645) No need to verify mail key when none exist. Seen in http://spire.akkadius.com/dev/release/22.28.0?id=12069 --- ucs/database.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ucs/database.cpp b/ucs/database.cpp index edbfe3f4b..25941d1a8 100644 --- a/ucs/database.cpp +++ b/ucs/database.cpp @@ -156,6 +156,11 @@ bool UCSDatabase::VerifyMailKey(const std::string& characterName, int IPAddress, return false; } + if (results.RowCount() == 0) { + LogInfo("No mailkeys found for [{}].", characterName.c_str()); + return false; + } + auto row = results.begin(); // The key is the client's IP address (expressed as 8 hex digits) and an 8 hex digit random string generated