The 'squid_error' and 'has' are the only ACLs that do not support
loading their parameters from a file using the "path/filename" syntax.
We see no justification for this exception, and it stands in the way of
(unrelated) configuration improvements we are working on (that will,
among other things, prevent such accidents from happening again).
This change causes no upgrade problems because it does not change
handling of previously accepted configurations. It only expands the set
of acceptable configurations, better matching documentation and admin
expectations with regard to universal "path/filename" syntax support.
void
ACLHasComponentData::parse()
{
- const char *tok = ConfigParser::NextToken();
+ const auto tok = ConfigParser::strtokFile();
if (!tok) {
debugs(28, DBG_CRITICAL, "FATAL: \"has\" acl argument missing");
self_destruct();
return;
}
- if (ConfigParser::PeekAtToken()) {
+
+ parseComponent(tok);
+
+ if (ConfigParser::strtokFile()) {
debugs(28, DBG_CRITICAL, "FATAL: multiple components not supported for \"has\" acl");
self_destruct();
return;
}
- parseComponent(tok);
}
bool
void
ACLSquidErrorData::parse()
{
- while (char *token = ConfigParser::NextToken()) {
+ while (const auto token = ConfigParser::strtokFile()) {
err_type err = errorTypeByName(token);
if (err < ERR_MAX)