AdguardTeam / AdguardTeam/CoreLibs

Rules with CSS `@media` rule are considered as unsafe and rejected

Offen
#2,098 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @ngorskikh Auf GitHub ansehen
Bug Priority: P4 Version: CoreLibs v1.24
Vorherrschende Sprache
Keine Sprachdaten
Sterne
52
Forks
10
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Please answer the following questions for yourself before submitting an issue

- [x] Filters were updated before reproducing an issue
- [x] I checked the [knowledge base](https://adguard.com/kb/) and found no answer
- [x] I checked to make sure that this issue has not already been filed

### AdGuard version

8.1 / CoreLibs: 1.22.29

### Browser version

Any

### OS version

Any

### Issue Details

Steps to reproduce:
1. Open debug log of AdGuard program
2. Search for `#$#@media`

### Expected Behavior

These rules don't contain URLs, and must be accepted as in AdGuard browser extensions.

### Actual Behavior

Rules with `#$#@media` considered as unsafe and rejected

```
WARNING, AdguardSvc.exe, cssfilter is_valid_rule: Rule 'web.joongna.com#$#@media (max-width: 480px) { .max-\[480px\]\:mt-\[73px\] { margin-top: 0 !important; } }' is unsafe and not allowed
WARNING, AdguardSvc.exe, cssfilter cssfilter_addrule: Rule is not valid, ignoring it (web.joongna.com#$#@media (max-width: 480px) { .max-\[480px\]\:mt-\[73px\] { margin-top: 0 !important; } })
WARNING, AdguardSvc.exe, AGProxyFilter addRule: Rule rejected by all filters: web.joongna.com#$#@media (max-width: 480px) { .max-\[480px\]\:mt-\[73px\] { margin-top: 0 !important; } }
WARNING, AdguardSvc.exe, cssfilter is_valid_rule: Rule 'klerk.ru#$#@media (min-width: 1280px) { .desktop\:top-pre-header-height { top: 0 !important; } }' is unsafe and not allowed
WARNING, AdguardSvc.exe, cssfilter cssfilter_addrule: Rule is not valid, ignoring it (klerk.ru#$#@media (min-width: 1280px) { .desktop\:top-pre-header-height { top: 0 !important; } })
WARNING, AdguardSvc.exe, AGProxyFilter addRule: Rule rejected by all filters: klerk.ru#$#@media (min-width: 1280px) { .desktop\:top-pre-header-height { top: 0 !important; } }
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.