aboutsummaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-13 07:44:32 +0000
committerGravatar Sadie Powell2023-01-13 07:46:47 +0000
commit713b57749674beb77f1bedbec984776ad4d5a8ca (patch)
treedf7315487d8c8f36855d24f8cf2cf01510e9b870 /src/helperfuncs.cpp
parentAdd a new cloak system that cloaks using HMAC-SHA256. (diff)
parentFix core_dns rejecting simple hostnames. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index da2a6362b..446e3866f 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -204,7 +204,7 @@ bool InspIRCd::DefaultIsIdent(const std::string_view& n)
return true;
}
-bool InspIRCd::IsHost(const std::string& host)
+bool InspIRCd::IsHost(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)
@@ -260,7 +260,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)