Commit Graph

10 Commits (master)

Author SHA1 Message Date
vi 4708e7fc8c Avoid the regular expression engine in parsing rule targets.
I read in the bible (https://www.eff.org/https-everywhere/rulesets) that:

"""
To cover all of a domain's subdomains, you may want to specify a
wildcard target like *.twitter.com. Specifying this type of left-side
wildcard matches any host name with .twitter.com as a suffix, e.g.
www.twitter.com or urls.api.twitter.com. You can also specify a
right-side wildcard like www.google.*. Right-side wildcards, unlike
left-side wildcards, apply only one level deep. So if you want to
cover all countries you'll generally need to specify www.google.*,
www.google.co.*, and www.google.com.* to cover domains like
www.google.co.uk or www.google.com.au.
"""

The previous interpretation is both incorrect (because right wildcards
only apply one level deep) and potentially expensive (regular
expression matching is exponential in the worst-case.)
2017-12-05 20:54:40 +01:00
vi 9fcf5bc289 Refactored ICU extras. 2015-11-08 17:16:05 +08:00
vi c26afe01cf Don't admit package-wise parameterisation of rulesets.
As 'a6f28e07a1edc8f62f3dfaf7965b3a818c2f4a7f' showed, there may be
breaking changes in the structure of rulesets between releases. I
don't intend to verify that every pair in the product works (is there
reason to be interested in any other than the latest?), so let's not
acommodate any more than one.
2015-11-08 00:53:35 +08:00
vi e3c171b67e Prepare to assimilate https-everywhere-rules-raw. 2015-11-04 21:57:59 +08:00
vi 427a2516b3 Isolated tests for predicates defined in the top-level Internal module. 2014-08-23 19:00:48 +08:00
vi 8ec3419492 Failing tests for parseRuleSets. 2014-08-11 05:32:06 +08:00
vi 49be7aa1a0 Use more structured URI representation; targets match only hosts.
This resolves #2.
2014-08-11 03:32:51 +08:00
vi 444b5ea51d Don't strip the text surrounding a match when performing find and replace.
Meta:
  Cross-Reference: #2
2014-08-11 02:09:02 +08:00
vi 809cca61b7 A unit test for the target parser. 2014-08-11 00:38:16 +08:00
vi d86284f09e Unit tests for Data.Text.ICU.Extras. 2014-08-11 00:12:36 +08:00