mirror of
https://github.com/transmission/transmission
synced 2024-12-30 19:46:56 +00:00
fix: potentially incorrect error message in rpc-server whitelist (#4264)
Fixes #928.
This commit is contained in:
parent
735ea201ea
commit
af9f1b4e42
1 changed files with 1 additions and 11 deletions
|
@ -807,18 +807,8 @@ static auto parseWhitelist(std::string_view whitelist)
|
||||||
auto const pos = whitelist.find_first_of(" ,;"sv);
|
auto const pos = whitelist.find_first_of(" ,;"sv);
|
||||||
auto const token = tr_strvStrip(whitelist.substr(0, pos));
|
auto const token = tr_strvStrip(whitelist.substr(0, pos));
|
||||||
list.emplace_back(token);
|
list.emplace_back(token);
|
||||||
|
tr_logAddInfo(fmt::format(_("Added '{entry}' to host whitelist"), fmt::arg("entry", token)));
|
||||||
whitelist = pos == std::string_view::npos ? ""sv : whitelist.substr(pos + 1);
|
whitelist = pos == std::string_view::npos ? ""sv : whitelist.substr(pos + 1);
|
||||||
|
|
||||||
if (token.find_first_of("+-"sv) != std::string_view::npos)
|
|
||||||
{
|
|
||||||
tr_logAddWarn(fmt::format(
|
|
||||||
_("Added '{entry}' to host whitelist and it has a '+' or '-'! Are you using an old ACL by mistake?"),
|
|
||||||
fmt::arg("entry", token)));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tr_logAddInfo(fmt::format(_("Added '{entry}' to host whitelist"), fmt::arg("entry", token)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
|
Loading…
Reference in a new issue