Skip to content

Commit aaceb4f

Browse files
committed
Check the length of the username in DefaultIsUser.
1 parent d7a320e commit aaceb4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/helperfuncs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ bool InspIRCd::DefaultIsNick(const std::string_view& n)
277277
/* return true for good username, false else */
278278
bool InspIRCd::DefaultIsUser(const std::string_view& n)
279279
{
280-
if (n.empty())
280+
if (n.empty() || n.length() > ServerInstance->Config->Limits.MaxUser)
281281
return false;
282282

283283
for (const auto chr : n)

0 commit comments

Comments
 (0)