AdguardTeam / AdguardTeam/CoreLibs

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

Đang mở
#2,098 0 bình luận 0 reaction 1 người được giao Được @ngorskikh nhận Xem trên GitHub
Bug Priority: P4 Version: CoreLibs v1.24
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
52
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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; } }
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.