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

Do not split rules with many domains in the unless-domain and if-domain #51

Closed
ameshkov opened this issue Jun 21, 2023 · 12 comments
Closed

Comments

@ameshkov
Copy link
Member

~example.org,.....,~example1000.org##banner rule will be split into several rules in the resulting json. This is plain wrong.

Here's what we should do:

  1. Check how many domains can in theory be specified in unless-domains
  2. Discard rules that have more domains than that.
@ameshkov ameshkov added the bug Something isn't working label Jun 21, 2023
@Alex-302
Copy link
Member

2. Discard rules that have more domains than that.

How will the filters maintainers know about this?

@ameshkov
Copy link
Member Author

The only way would be to have a special check in AGLint for this.

@Alex-302
Copy link
Member

Maybe the apps that has problems with such rules should be warned about it - only AdGuard for iOS and Safari?
Other products are not affected by the problem.

@ameshkov
Copy link
Member Author

There are lots of rules that are getting discarded when converting them for Safari, it's not realistic to list them all.

The problem with this particular case is that the problem can be not with a single rule, but with a multitude of #@# rules.

@Alex-302
Copy link
Member

it's not realistic to list them all

Can be printed to the log.

@ameshkov
Copy link
Member Author

I actually think we're doing that when debug log is enabled

@Alex-302
Copy link
Member

I can't find it

image

@ameshkov
Copy link
Member Author

ameshkov commented Jun 21, 2023

Examine com.adguard.AdguardExtension

@Alex-302
Copy link
Member

I don't see any rules there.

Why not use the obvious file names? Because of OS limitations?

image

@ameshkov
Copy link
Member Author

Tbh, no idea:)

@Alex-302
Copy link
Member

In any case, only the number of errors is logged, not the details.

image

@maximtop
Copy link
Contributor

maximtop commented Jun 22, 2023

I've tested on macOS 13.4 and Safari 16.5, and it looks like "unless-domain" and "if-domain" support at least 10000 values.
So, we should stop splitting them both.

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