AdguardTeam / AdguardTeam/CoreLibs

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

Abierto
#2,098 0 comentarios 0 reacciones 1 asignado Reclamado por @ngorskikh Ver en GitHub
Bug Priority: P4 Version: CoreLibs v1.24
Lenguaje dominante
Sin datos de lenguaje
Estrellas
52
Forks
10
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.