Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    • Menu
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • A adblockpluscore
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 86
    • Issues 86
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Jira
    • Jira
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • eyeo
  • adblockplus
  • abc
  • adblockpluscore
  • Issues
  • #264
Closed
Open
Created Oct 13, 2020 by Hubert Figuière@hfiguiereMaintainer

Investigate rejecting too broad filters

Background

This come from Easylist issue https://github.com/easylist/easylist/issues/6123

A filter with a single letter (u) was added to the filter list basically blocking any URL containing u.

So we should investigate what is the minimum length of a generic filter to not be reject.

A few key item to consider:

  • Check all Easylist to determine what the minimum relevant filter
  • Interestingly the matcher, as an implementation detail, limit "keywords" to 3 chars. Keyword are continuous string of alpha-numerical values to classify filters for lookup purpose. It indicate to some extent what amount of information is considered.

What to change

Change filterClasses.js to reject filters deemed too broad.

Integration Notes

This will introduce two new invalid filter reasons which may require associated UI messages:

  • filter_url_not_specific_enough - when a generic URL filter's pattern is 3 characters or less
  • filter_elemhide_not_specific_enough - when a generic elemhide, elemhide exception, or elemhide emulation filter's body is 2 characters or less

Testing notes

  • Try to add a short generic filter, like ##p or u.
  • You should be unable to add this as a custom filter, since these are now invalid filters.
  • This only applies to generic filters, so if you specify a domain, u$domain=example.com, then it is valid.
Edited Aug 18, 2021 by Justin Wernick
Assignee
Assign to
Time tracking