#38 Wildcard support + list management testing
Merged by quidam. Opened by gioma1.
gioma1/librejs feature/wildcards  into  master

Download 38.patch

Adds support for wildcarding subdomains and/or paths (e.g. https://.gnu.org/ would match any .gnu.org domain, no matter the path), both in the back-end and in the front-end (main panel and preference panel).
Includes testing for whitelisting and blacklisting with support for wildcards.
Fixed some asynchronous call bugs along the way, discovered running the newly added automated tests :)

2 new commits added

  • Fixed UI inconsistencies when whitelisting/blacklisting through wide wildcard matching.
  • Fix Storage.js throwing exception unless loaded as a module.

Just added a couple bug fixes.
The described UI inconsistencies are about showing the site as whitelisted or blacklisted (correctly) when this happens through a match with a list entry wider than the site itself (e.g. https:/.gnu.org/ vs the narrower automatic site entry https://gnu.org/*), but not providing any information about the actual match and instead showing an enabled "Forget" button, which actually does nothing. This is confusing as best (as noted by Ruben), therefore the fix: showing information about the matching entry, if it's different than the site itself, and disabling the "Forget" button in this case (you can always forget by removing the wider entry, if that's what you really want).

1 new commit added

  • More consistent and efficient blacklisting.

In the just added commit, the two blacklisting-related changes discussed in the last meeting:

  1. Blocking blacklisted scripts before we hit the network, in an onBeforeRequest listener

  2. Prevent parsing inline scripts when the page is blacklisted (relying on CSP to block scripting).

Pull-Request has been merged by quidam

Metadata