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

Minimal rule length should not be applied to * in the hostname mask #5245

Closed
3 tasks done
Alex-302 opened this issue Dec 8, 2022 · 3 comments
Closed
3 tasks done
Assignees
Labels
bug external libs Issues that require changes in external libraries. P3: Medium
Milestone

Comments

@Alex-302
Copy link
Member

Alex-302 commented Dec 8, 2022

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to report a bug and not ask a question

Operating system type

Linux, Other (please mention the version in the description)

CPU architecture

x86

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

v0.108.0-a.391+09f88cf2

Description

What did you do?

Trying to block requests from all devices, except clients from the list.

Actual result

The rules with AdGuard ad blocker syntax with * or empty host(url) part do not work
$client=~'Allowed client'
*$client=~'Allowed client'

A similar rule with few * is working
****$client=~'Allowed client'

Probably this is caused by a minimal rule length(3 symbols, as I see. In ad blockers - 4 symbols.)

Expected result

These rules must work

`$client=~'Allowed client'`
`*$client=~'Allowed client'`
@ameshkov
Copy link
Member

ameshkov commented Dec 8, 2022

It should depend on the rule modifiers. Of course it should not be applied when there's a $client modifier, but when there're no modifiers at all I think we still should.

@ainar-g ainar-g self-assigned this Dec 8, 2022
@ainar-g ainar-g added this to the v0.107.21 milestone Dec 8, 2022
@ainar-g ainar-g added bug P3: Medium external libs Issues that require changes in external libraries. labels Dec 8, 2022
@ameshkov
Copy link
Member

ameshkov commented Dec 9, 2022

Fixed in urlfilter v0.16.1

@ainar-g
Copy link
Contributor

ainar-g commented Feb 1, 2023

This will be released in the upcoming v0.107.23. Sorry it took too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug external libs Issues that require changes in external libraries. P3: Medium
Projects
None yet
Development

No branches or pull requests

3 participants