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

Expires property in some lists is not read and set properly by Brave #31238

Closed
ghost opened this issue Jun 22, 2023 · 3 comments · Fixed by brave/brave-core#19325
Closed

Expires property in some lists is not read and set properly by Brave #31238

ghost opened this issue Jun 22, 2023 · 3 comments · Fixed by brave/brave-core#19325
Assignees
Labels
bug feature/shields/adblock Blocking ads & trackers with Shields OS/Desktop priority/P4 Planned work. We expect to get to it "soon". QA Pass-macOS QA/Yes release-notes/include webcompat/lists Webcompat issues that seem to be because our lists of what to or not to block could be improved.

Comments

@ghost
Copy link

ghost commented Jun 22, 2023

Description

@antonok-edm
Because of the conversation about the $badfilter and the Default lists and Different Engines, I decided to use the Default lists as Custom lists to test the Expires feature in a greater scale than uBlock Quick Fixes list and my own ones.

Well, the feature works great when the Expires property is set to only Expires: # days BUT I noticed the property is not read and set properly by Brave in some lists where there are more than that.

Easylist, Easylist Privacy, have it as Expires: 4 days (update frequency) and urlhaus-filter-agh-online has it as Expires: 1 day (update frequency) same as fanboy-notifications.txt (added by me) but they are set in Local State file to 168 hours, and not the 96 and 24 hours that should be, respectively.
So, Expires should also take into account the (update frequency) some lists decided to add.

image

@ghost ghost added the OS/Desktop label Jun 22, 2023
@rebron rebron added webcompat/lists Webcompat issues that seem to be because our lists of what to or not to block could be improved. priority/P4 Planned work. We expect to get to it "soon". labels Jun 23, 2023
@ghost
Copy link
Author

ghost commented Jul 6, 2023

This is being fixed in the PR brave/adblock-rust#298, everything shall work fine when its merged and available for users.

Thanks to @DJAndries 👍

@ghost ghost closed this as completed Jul 6, 2023
@antonok-edm antonok-edm self-assigned this Jul 7, 2023
@antonok-edm antonok-edm added the feature/shields/adblock Blocking ads & trackers with Shields label Jul 7, 2023
@antonok-edm
Copy link
Collaborator

@Emi-TheDhamphirInLoveUnderTheFrozenStar I'll leave this open for the team track the feature in brave-core until it lands in Nightly.

@stephendonner
Copy link
Collaborator

stephendonner commented Aug 16, 2023

Verification PASSED using

Brave 1.58.90 Chromium: 116.0.5845.96 (Official Build) beta (x86_64)
Revision c112ad8c854bd34b48f4e87bfb3f7951e426a1d4
OS macOS Version 11.7.9 (Build 20G1426)

More-permissive Expires parsing - PASSED

  1. installed 1.58.90
  2. launched Brave
  3. opened brave://settings/shields/filters
  4. pasted https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-agh-online.txt into the Add custom filter lists textfield, and clicked Add
  5. shut down Brave
  6. opened Local State from my profile directory in a text editor
  7. examined the Expires header value for the list I just added

Confirmed "expires": 24

example example example
Screen Shot 2023-08-16 at 12 04 55 PM Screen Shot 2023-08-16 at 11 54 30 AM Screen Shot 2023-08-16 at 11 56 16 AM

Scriptlet argument $ parsing - PASSED

Steps:

  1. installed 1.58.90
  2. launched Brave
  3. opened Developer Tools
  4. clicked on the Console panel
  5. entered localStorage.setItem("Test","0"); into the above and pressed return`
  6. pasted brave.com##+js(set-local-storage-item, Test, $remove$) into the Create custom filters textbox and clicked Save changes
  7. reloaded the tab with brave.com

Confirmed the "Test" entry was removed

example example example example
Screen Shot 2023-08-16 at 12 07 51 PM Screen Shot 2023-08-16 at 12 08 16 PM Screen Shot 2023-08-16 at 12 09 06 PM Screen Shot 2023-08-16 at 12 09 21 PM

@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Aug 16, 2023
@rebron rebron changed the title Expires property in some lists is not read and set properly by Brave. Expires property in some lists is not read and set properly by Brave Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature/shields/adblock Blocking ads & trackers with Shields OS/Desktop priority/P4 Planned work. We expect to get to it "soon". QA Pass-macOS QA/Yes release-notes/include webcompat/lists Webcompat issues that seem to be because our lists of what to or not to block could be improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants