1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-28 15:36:37 +02:00

Fix documentation confusing regarding rpc-user::match vs ::mask.

Only match was working earlier, and for now both are accepted,
like everywhere else. Reported by BlackBishop.

Also, added a missing check for unknown rpc-user items, so a
proper "Unknown directive" error is thrown.
(this missing check made the first issue worse)
This commit is contained in:
Bram Matthys
2023-06-30 15:17:20 +02:00
parent 3c82dd61e2
commit 8d50efd29e
+7 -2
View File
@@ -380,7 +380,7 @@ int rpc_config_test_rpc_user(ConfigFile *cf, ConfigEntry *ce, int type, int *err
}
for (cep = ce->items; cep; cep = cep->next)
{
if (!strcmp(cep->name, "match"))
if (!strcmp(cep->name, "match") || !strcmp(cep->name, "mask"))
{
has_match = 1;
test_match_block(cf, cep, &errors);
@@ -390,6 +390,11 @@ int rpc_config_test_rpc_user(ConfigFile *cf, ConfigEntry *ce, int type, int *err
has_password = 1;
if (Auth_CheckError(cep) < 0)
errors++;
} else
{
config_error_unknown(cep->file->filename,
cep->line_number, "rpc-user", cep->name);
errors++;
}
}
@@ -412,7 +417,7 @@ int rpc_config_run_rpc_user(ConfigFile *cf, ConfigEntry *ce, int type)
for (cep = ce->items; cep; cep = cep->next)
{
if (!strcmp(cep->name, "match"))
if (!strcmp(cep->name, "match") || !strcmp(cep->name, "mask"))
{
conf_match_block(cf, cep, &e->match);
} else