mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 12:00:16 -07:00
WebUI: Display error when download fails
Previously we would still download the file but it would contain the error response, resulting in an invalid file. To test: export a .torrent file for a torrent that hasn't yet downloaded metadata PR #21696. Signed-off-by: Thomas Piccirello <thomas@piccirello.com>
This commit is contained in:
parent
61ff683f11
commit
78a5e4ff3e
3 changed files with 33 additions and 9 deletions
|
@ -467,7 +467,7 @@ void WebApplication::configure()
|
|||
const QString contentSecurityPolicy =
|
||||
(m_isAltUIUsed
|
||||
? QString()
|
||||
: u"default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; script-src 'self' 'unsafe-inline'; object-src 'none'; form-action 'self';"_s)
|
||||
: u"default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; script-src 'self' 'unsafe-inline'; object-src 'none'; form-action 'self'; frame-src 'self' blob:;"_s)
|
||||
+ (isClickjackingProtectionEnabled ? u" frame-ancestors 'self';"_s : QString())
|
||||
+ (m_isHttpsEnabled ? u" upgrade-insecure-requests;"_s : QString());
|
||||
if (!contentSecurityPolicy.isEmpty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue