summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-07-14 22:41:01 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-07-22 12:11:03 +0200
commit055fe1f56b1a86568cf5794f3e891046876132c6 (patch)
tree329744e7fe418d3e4db153609f75f7ad23f7312a /dom
parentcd964d099ff9da58c05617beee81ac3364098679 (diff)
downloadUXP-055fe1f56b1a86568cf5794f3e891046876132c6.tar
UXP-055fe1f56b1a86568cf5794f3e891046876132c6.tar.gz
UXP-055fe1f56b1a86568cf5794f3e891046876132c6.tar.lz
UXP-055fe1f56b1a86568cf5794f3e891046876132c6.tar.xz
UXP-055fe1f56b1a86568cf5794f3e891046876132c6.zip
Add preference to allow the loading of FTP subresources for corner cases
Diffstat (limited to 'dom')
-rw-r--r--dom/security/nsContentSecurityManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/dom/security/nsContentSecurityManager.cpp b/dom/security/nsContentSecurityManager.cpp
index f2cbc8fcf..12c55e8f6 100644
--- a/dom/security/nsContentSecurityManager.cpp
+++ b/dom/security/nsContentSecurityManager.cpp
@@ -98,6 +98,9 @@ nsContentSecurityManager::CheckFTPSubresourceLoad(nsIChannel* aChannel)
// We dissallow using FTP resources as a subresource everywhere.
// The only valid way to use FTP resources is loading it as
// a top level document.
+ if (!mozilla::net::nsIOService::BlockFTPSubresources()) {
+ return NS_OK;
+ }
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
if (!loadInfo) {