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

include bug #3685

Closed
KonoromiHimaries opened this issue Apr 7, 2018 · 14 comments
Closed

include bug #3685

KonoromiHimaries opened this issue Apr 7, 2018 · 14 comments

Comments

@KonoromiHimaries
Copy link

if i use !#include /headers/adblock_headery.txt in

https://github.com/KonoromiHimaries/polish-ads-filter/blob/master/internal-filters/adblock_wewnetrzne.txt

then i have double slash
bez tytulu

ubo 1.15.24
chrome 65.0.3325.181

@krystian3w
Copy link

krystian3w commented Apr 7, 2018

Maybe no use / for start.

@gwarser
Copy link
Contributor

gwarser commented Apr 7, 2018

Relative path /headers/adblock_headery.txt inside https://github.com/KonoromiHimaries/polish-ads-filter/blob/master/internal-filters/adblock_wewnetrzne.txt should give https://github.com/headers/adblock_headery.txt UBO is not supporting this #3331 (comment)

@krystian3w
Copy link

When delete first / link should ok and uBlock load lists.

@gorhill
Copy link
Owner

gorhill commented Apr 8, 2018

it's just a typo/cosmetic bug

I don't consider this a bug, not even a cosmetic one -- there is no reason to use a leading /.

@BilBg
Copy link

BilBg commented Apr 8, 2018

Suggestion 1:
#3331 (comment)

!#include ../path2/includedfile.txt

That "relative path" usage was suggested in a draft by AdguardTeam (to go to parent directory)
AdguardTeam/AdguardBrowserExtension#917

My post with Test_include_relative_path.txt was to show that this can be used to !#include non-own file.

If a sublist contains the substring .., it will be rejected.

By "it" I think @gorhill means: the entire !#include line will be rejected (and not only the ..)

Suggestion 2:
#3331 (comment):

!#include /easylist/easylist/master/easylist/easylist_whitelist.txt

That was not a "Suggestion" but a question - to ensure that the new code dealing with .. can't be fooled to start from root by using / as first symbol.

Note:
Sometimes there is no problem with using many ///(the same page is opened)
https://github.com/gorhill///uBlock/
https://github.com/gorhill////uBlock/
https://github.com/gorhill///////uBlock/

https://www.youtube.com////////////////watch?v=O47KDrMBtSk&t=3
https://www.youtube.com/watch?v=O47KDrMBtSk&t=3

... but not always:
https://www.wikiwand.com/en/Krisia_Todorova
https://www.wikiwand.com/en//Krisia_Todorova

https://pastebin.com/raw/dHidQupm
https://pastebin.com/raw//dHidQupm

@BilBg
Copy link

BilBg commented Apr 9, 2018

If a sublist contains the substring .., it will be rejected.

Maybe should be:
If a sublist filename/path contains the substring .., the !#include will be rejected.

@gorhill - Is there a way for the author of the list to know what is rejected/ignored?
Or generally if !#include failed, e.g. if sublist do not exist (typo in filename/path)?

@krystian3w
Copy link

krystian3w commented Apr 9, 2018

Is there a way for the author of the list to know what is rejected/ignored?

Show in uBlock (counter / source list).

! >>>>>>>> full url
!-----------------------Your filters -----------------------!
! . . .
! <<<<<<<< full url

No see this elements when sublist is rejected/ignored.

If user report ads to your project (blocked now with sublist) you may please him/her see list (to find included sublist), ask how many all rules see for your list (after update) or ask if he/she sees an advertisement on any site (where sublist blocking already).


Or generally if !#include failed, e.g. if sublist do not exist (typo in filename/path)?

Yes, list no load and no block elements/actions/communication/files.

@krystian3w
Copy link

@gorhill multiple use #include is acceptable / correct?

When I try use 3 #include, last #include duplicate sublist on main list and show counter with new not used filters.
Duplicate last list have when update other list or disable other - most often.

@gorhill
Copy link
Owner

gorhill commented Apr 9, 2018

multiple use #include is acceptable / correct?

Yes. If you see an issue, please provide steps to reproduce. Also, mind that #3624 was fixed in 1.15.20.

@krystian3w
Copy link

Ok 👌

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

6 participants
@gorhill @gwarser @KonoromiHimaries @BilBg @krystian3w and others