Only apply generic $removeparam rules to document/subdocument/xhr requests by default #38753
Labels
bug
feature/shields/adblock
Blocking ads & trackers with Shields
OS/Android
Fixes related to Android browser functionality
OS/Desktop
QA/No
release-notes/include
Milestone
Description
Recently I noticed how I couldn't play a tiktok video on the browser, and filtering out it's because I have https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_17_TrackParam/filter.txt and that list has the
$removeparam=btag
generic remove param.and that is being applied to the Media in tiktok, not just the document.
if you use
$document,removeparam=btag
Tiktok will work because it will filter the removeparam to just the document and if you use$media,removeparam=btag
the issue will re-appear, because media is now the target.This seems something interesting going on in Brave because other adblockers don't seem to be doing that removing of parameters in media or other elements.
Can people get tracked by parameters on other than documents? probably, so the problem is not that the removeparam is being applied to media, but that a generic one which is pretty common in lists is not applied to the document only, because that would be the best usage case for that one and how it is done by external lists like Adguard filter_17_TrackParam one.
Anyway, if you go to https://www.tiktok.com/@shellie468/video/7308173621657193770 the video will not play, and if you go to devtools it will say
(canceled)
as the reason for not working, and on Android it will just say the video is not available right away.You can see here the normal URL:
https://v16-webapp-prime.tiktok.com/video/tos/maliva/tos-maliva-ve-0068c799-us/o0pDiVDXFKkga2rjcRFeABlE43AIESQfgl9ODE/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=unwatermarked&cd=0%7C0%7C0%7C&cv=1&br=2634&bt=1317&cs=0&ds=6&ft=4fUEKMMh8Zmo0U.3J-4jV.CgZpWrKsd.&mime_type=video_mp4&qs=0&rc=aWVoOzY4M2Q8ZDQ5M2lkaEBpM2w0NHU5cjt3bzMzZzczNEBhY2IyLTUwXl8xLTAtLV41YSNjMmxyMmQ0ZWlgLS1kMS9zcw%3D%3D&btag=e00090000&expire=1717229326&l=20240601020740A4BDF53D0897721918A7&ply_type=2&policy=2&signature=537033f2dbd01950a9d89397dce22dff&tk=tt_chain_token
and you can see the
&btag=e00090000
being removed here.https://v16-webapp-prime.tiktok.com/video/tos/maliva/tos-maliva-ve-0068c799-us/o0pDiVDXFKkga2rjcRFeABlE43AIESQfgl9ODE/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=unwatermarked&cd=0%7C0%7C0%7C&cv=1&br=2634&bt=1317&cs=0&ds=6&ft=4fUEKMMh8Zmo0bi3J-4jV~bhJpWrKsd.&mime_type=video_mp4&qs=0&rc=aWVoOzY4M2Q8ZDQ5M2lkaEBpM2w0NHU5cjt3bzMzZzczNEBhY2IyLTUwXl8xLTAtLV41YSNjMmxyMmQ0ZWlgLS1kMS9zcw%3D%3D&btag=e00090000&expire=1717229250&l=202406010206245D8FD57D0A4109192678&ply_type=2&policy=2&signature=c79dab648b138181d2e1bcbfda8d3863&tk=tt_chain_token
I didn't have this issue before, so I wonder if it is a regression because I doubt, this was a previous behavior with generic removeparam rules, because I doubt tiktok just started adding those parameters to their videos.
Steps to reproduce
$removeparam=btag
Actual result
Generic $removeparam is being applied to more than just the document
Expected result
Generic $removeparam should only apply to documents unless specified by the rule.
Reproduces how often
Easily reproduced
Desktop Brave version (brave://version info)
1.68.61 Chromium: 126.0.6478.26 (Official Build) nightly (64-bit)
Windows 11 Version 23H2 (Build 22631.3672)
Android device
The text was updated successfully, but these errors were encountered: