Brave should not intercept non-navigation .torrent file requests
See original GitHub issueDescription
If a web page embeds the WebTorrent client-side JS library and attempts to load a .torrent
file using an XHR request or fetch
, Brave will intercept the .torrent
file load and replace it with the chrome-extension
HTML, breaking the site. This is true not just for the WebTorrent JS library but for any request to fetch a .torrent
file.
There’s a CodePen that demonstrates this here: https://codepen.io/yciabaud/pen/XdOeWM
Steps to Reproduce
- Visit https://codepen.io/yciabaud/pen/XdOeWM
- The torrent demo should fail with an error in the console.
- Now, disable the WebTorrent extension in Brave settings.
- The demo now works.
Actual result:
Uncaught Error: Error downloading torrent: XHR error
at VM37 webtorrent.min.js:5
at t.exports.<anonymous> (VM37 webtorrent.min.js:7)
at t.exports.t (VM37 webtorrent.min.js:5)
at t.exports.r.emit (VM37 webtorrent.min.js:4)
at XMLHttpRequest.c.onerror (VM37 webtorrent.min.js:7)
Expected result:
Brave should not intercept requests for .torrent
files unless they are top-level navigation requests.
Reproduces how often:
Easily reproduced
Brave version (brave://version info)
Version 0.66.101 Chromium: 75.0.3770.142 (Official Build) (64-bit)
Version/Channel Information:
- Can you reproduce this issue with the current release? Yes
- Can you reproduce this issue with the beta channel?
- Can you reproduce this issue with the dev channel?
- Can you reproduce this issue with the nightly channel?
Other Additional Information:
- Does the issue resolve itself when disabling Brave Shields?
- Does the issue resolve itself when disabling Brave Rewards?
- Is the issue reproducible on the latest version of Chrome?
Miscellaneous Information:
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Torrenting within Brave? Is this new? Is it safe?
Hi. So I noticed something that surprised me. Brave can download Torrent files (or Magnets) straight in the browser. Curious about this: is ......
Read more >Torrent Datas Showing - Brave Feature Requests
Brave needs a feature that allows you too see more informations about the torrents you are downloading, as qbittorrent, it should show who ......
Read more >Torrent save location - don't save to RAM - Brave Community
Today, i have been trying to download a few torrents simultaneously, to all have them crash for either a memory shortage (the ram...
Read more >Torrents should be immediately downloaded - Brave Community
If I'm downloading a torrent, isn't it safe to assume that I plan on keeping it, not just seeding it?
Read more >Turn Off Brave Torrents - Desktop Requests
I want to use my own torrent client to handle torrent and magnet link. On Chrome, I just click on a torrent link...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Verification PASSED on
macOS 10.14.6 x64
using the following build:WebTorrent
is both enabled and disabled as per https://github.com/brave/brave-browser/issues/5361#issuecomment-532529740Verification passed on
WebTorrent
is both enabled and disabled as per https://github.com/brave/brave-browser/issues/5361#issuecomment-532529740Verification passed on
WebTorrent
is both enabled and disabled as per https://github.com/brave/brave-browser/issues/5361#issuecomment-532529740@kjozwiak Yep, this is expected behavior. This is JavaScript code running on the website itself and has nothing to do with the built-in WebTorrent implementation in Brave. It’s supposed to work in both cases – when the WebTorrent extension is enabled or disabled.