aboutsummaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-01-20 20:59:33 +0000
committerGravatar Sadie Powell2026-01-20 20:59:33 +0000
commitaaceb4fd9aae237a27b1b88d8b23432e02dcfa42 (patch)
tree479f726b157cd11456eaef76ada7c9b4cce69447 /src/helperfuncs.cpp
parentFix truncating user/host/real names. (diff)
Check the length of the username in DefaultIsUser.
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 756aeb11b..ac6e9fccc 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -277,7 +277,7 @@ bool InspIRCd::DefaultIsNick(const std::string_view& n)
/* return true for good username, false else */
bool InspIRCd::DefaultIsUser(const std::string_view& n)
{
- if (n.empty())
+ if (n.empty() || n.length() > ServerInstance->Config->Limits.MaxUser)
return false;
for (const auto chr : n)