From b353b799a2288bfde132a1909f78f4e1cbd1fd28 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 13 Jan 2023 07:17:32 +0000 Subject: Fix core_dns rejecting simple hostnames. --- src/helperfuncs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index f2b023f81..0b5681d0e 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -273,7 +273,7 @@ bool InspIRCd::DefaultIsIdent(const std::string& n) return true; } -bool InspIRCd::IsHost(const std::string& host) +bool InspIRCd::IsHost2(const std::string& host, bool allowsimple) { // Hostnames must be non-empty and shorter than the maximum hostname length. if (host.empty() || host.length() > ServerInstance->Config->Limits.MaxHost) @@ -329,7 +329,7 @@ bool InspIRCd::IsHost(const std::string& host) // Whilst simple hostnames (e.g. localhost) are valid we do not allow the server to use // them to prevent issues with clients that differentiate between short client and server // prefixes by checking whether the nickname contains a dot. - return numdots; + return numdots || allowsimple; } bool InspIRCd::IsSID(const std::string &str) -- cgit v1.3.1-10-gc9f91