-
Notifications
You must be signed in to change notification settings - Fork 975
Fixed torrent viewer CSP rule blocks <iframe> content #7243
Comments
I can tackle this issue. |
Torrent content is rendered into This is because the torrent may not be active and in that case, we show the "Start Download?" page.
This is because we only make a CSP exception for media elements, not iframe elements. This is an easy fix. |
Torrent content is rendered into <iframe> when it's not video or audio content. For example, a .jpg or a .pdf file. This is because we're using a viewer page that includes the content; we're not returning the content directly. This is because the torrent may not be active and in that case, we show the "Start Download?" page. When this occurs, CSP prevents the iframe from loading content from the webtorrent server at http://localhost:port This is because we only make a CSP exception for media elements, not iframe elements. This is an easy fix. Fixes: #7243
Moving to 0.14.1 |
Moving back to 0.14.0? |
Oh, sorry if I merged too soon. |
When torrent is opened within the the page, the file is not shown but opening the magnet link in a new tab it shows the file. Is this expected? No errors in console, on Windows 10 x64, like @luixxiul mentioned |
@srirambv @luixxiul All this behavior is expected. CodePen switched to https and that prevents us framing the I'll add The console error spew is normal and harmless. Working as expected, though I'm working on preventing the spew in this PR: #7351 |
Test Plan:
poster.jpg
orREADME.md
to view it in Brave.Original issue description
Did you search for similar issues before submitting this one? Yes
Describe the issue you encountered:
Sometimes torrent content is rendered in an
<iframe>
instead of a<video>
or<audio>
tag. It's unclear why. When this occurs, CSP prevents the iframe from loading content from the webtorrent server at http://localhost:portPlatform (Win7, 8, 10? macOS? Linux distro?): macOS Sierra
Brave Version (revision SHA):
master
@ 6cf4f1bSteps to reproduce:
Actual result: File content fails to load
Expected result: File content should load
Will the steps above reproduce in a fresh profile? If not what other info can be added? Yes
Is this an issue in the currently released version? Yes
Can this issue be consistently reproduced? Yes
The text was updated successfully, but these errors were encountered: