Skip to content

Commit

Permalink
Make variables in set::reject-message and other buildvarstring() usage
Browse files Browse the repository at this point in the history
no longer expand shorter versions of a variable. It previously had some
unintended form of magic autocomplete where $serv was handled the same
way as if it was $server. This could cause issues in the long run when
variables are added and the meaning of the short form changes.

Reported by westor in https://bugs.unrealircd.org/view.php?id=6123
  • Loading branch information
syzop committed Jun 5, 2022
1 parent 020c3d1 commit 28d3875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/support.c
Expand Up @@ -1269,7 +1269,7 @@ void buildvarstring(const char *inbuf, char *outbuf, size_t len, const char *nam
/* find variable name in list */
found = 0;
for (cnt = 0; name[cnt]; cnt++)
if (!strncasecmp(name[cnt], i, p - i))
if (!strncasecmp(name[cnt], i, strlen(name[cnt])))
{
/* Found */
found = 1;
Expand Down

0 comments on commit 28d3875

Please sign in to comment.