Open
Description
openedon Jul 5, 2022
The HTTPS Everywhere ruleset appears to contain regular expressions that our parser (re2) doesn't support.
For example, these rules:
{
"from": "^http://advertisingcentral\\.yahoo\\.com/+(?=$|\\?)",
"to": "https://advertising.yahoo.com/"
},
{
"from": "^http://fantasysports\\.yahoo\\.com/(?=$|\\?)",
"to": "https://sports.yahoo.com/fantasy"
},
Steps to Reproduce
- Start Brave from a terminal.
- Type
yahoo.ca
in the URL and press Enter.
Actual result:
The following error messages are printed to the terminal:
../../third_party/re2/src/re2/re2.cc:205: Error parsing '^http://advertisingcentral\.yahoo\.com/+(?=$|\?)': invalid perl operator: (?=
../../third_party/re2/src/re2/re2.cc:205: Error parsing '^http://fantasysports\.yahoo\.com/(?=$|\?)': invalid perl operator: (?=
Expected result:
The rules should either be supported or ignored. We should not try to run the ones we don't support.
This could be fixed in code, or we could clean up the ruleset.
Reproduces how often:
100% reproducible.
Desktop Brave version:
Brave | 1.42.45 Chromium: 103.0.5060.70 (Developer Build) (64-bit)
Revision | 1543faf9f70e61c6f6e9c01ff20a2e3cf2ad55dc-refs/branch-heads/5060_53@{#4}
OS | Linux
Activity