Previously the un-anchoring pattern was compiled resulting
in incorrect matches.
For example requests to:
https://www.privoxy.org/user-manual/config.html
were redirected because of the default.action section:
{+redirect{http://config.privoxy.org/}}
# Sticky Actions = +redirect{http://config.privoxy.org/}
# URL = http://www.privoxy.org/config
# Redirected URL = http://www.privoxy.org/config
# Redirect Destination = http://config.privoxy.org/
.privoxy.org/config
As the path pattern is left-anchored it should not match.
snprintf(rebuf, rebuf_size, fmt, pattern);
- *regex = pcre2_compile((const unsigned char *)pattern,
+ *regex = pcre2_compile((const unsigned char *)rebuf,
PCRE2_ZERO_TERMINATED, PCRE2_CASELESS, &errcode,
&error_offset, NULL);
if (*regex == NULL)