Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible regression in regular expression custom rule processing #2924

Open
3 tasks done
artu-ole opened this issue Aug 30, 2024 · 0 comments
Open
3 tasks done

Possible regression in regular expression custom rule processing #2924

artu-ole opened this issue Aug 30, 2024 · 0 comments

Comments

@artu-ole
Copy link

artu-ole commented Aug 30, 2024

Please answer the following questions for yourself before submitting an issue

  • Filters were updated before reproducing an issue
  • I checked the knowledge base and found no answer
  • I checked to make sure that this issue has not already been filed

AdGuard Extension version

4.4.22

Browser version

Brave Version 1.69.160 based on Chromium: 128.0.6613.114

OS version

Win 11

Issue Details

I had several custom rules in the following format which stopped working after a recent update. Here is a simple example of a format of rules I used that had functioned before and does not anymore although having a valid syntax
Steps to reproduce:

  1. Add custom rule /api\.github\.com\/\w{5}\/AdguardTeam/
  2. Go to https://github.com/AdguardTeam/AdguardBrowserExtension/issues
  3. Observe that request to https://api.github.com/users/AdguardTeam was not blocked.

Expected Behavior

expect the request to https://api.github.com/users/AdguardTeam to be blocked

Actual Behavior

request to https://api.github.com/users/AdguardTeam is not blocked

Additional Information

There are very similar rules that do function:

  1. if you don't escape the dots in the domain(which is meaningfully different of course):
    /api.github.com\/\w{5}\/AdguardTeam/
  2. if you use any char instead of word char(which is also meaningfully different):
    /api\.github\.com\/.{5}\/AdguardTeam/
  3. if you wrap word char in capture group(which is not meaningfully different, but why this one works but not the other?):
    /api\.github\.com\/(\w){5}\/AdguardTeam/

I just noticed that my rules stopped working and found those workarounds by trial and error, but I believe original rule breaking is a possible regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants