mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 03:03:12 +02:00
ident_lookup: reject spaces and control characters early.
...even though in m_nick there is code so it never gets into sptr->user->username.
This commit is contained in:
@@ -221,11 +221,11 @@ static char *ident_lookup_parse(Client *acptr, char *buf)
|
||||
/* Username */
|
||||
// A) Skip any ~ or ^ at the start
|
||||
for (; *buf; buf++)
|
||||
if (!strchr("~^", *buf))
|
||||
if (!strchr("~^", *buf) && (*buf > 32))
|
||||
break;
|
||||
// B) Stop at the end, IOTW stop at newline, space, etc.
|
||||
for (p=buf; *p; p++)
|
||||
if (strchr("\n\r@: ", *p))
|
||||
if (strchr("\n\r@:", *p) || (*p <= 32))
|
||||
{
|
||||
*p = '\0';
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user