diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-07-14 22:41:01 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-07-14 22:41:01 +0200 |
commit | dac0804c783a8bd17d18a98d17cd000189c53dc1 (patch) | |
tree | d4c4153819b192d23ed2bcbf6e99191a64d203a4 /netwerk | |
parent | 0f40d85fd48eef40fd90aa2636f1320ef554941b (diff) | |
download | uxp-dac0804c783a8bd17d18a98d17cd000189c53dc1.tar.gz |
Add preference to allow the loading of FTP subresources for corner cases
Diffstat (limited to 'netwerk')
-rw-r--r-- | netwerk/base/nsIOService.cpp | 9 | ||||
-rw-r--r-- | netwerk/base/nsIOService.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp index e0dc7d8e8d..bd9a4a96f4 100644 --- a/netwerk/base/nsIOService.cpp +++ b/netwerk/base/nsIOService.cpp @@ -166,6 +166,7 @@ uint32_t nsIOService::gDefaultSegmentSize = 4096; uint32_t nsIOService::gDefaultSegmentCount = 24; bool nsIOService::sBlockToplevelDataUriNavigations = false; +bool nsIOService::sBlockFTPSubresources = false; //////////////////////////////////////////////////////////////////////////////// @@ -243,6 +244,8 @@ nsIOService::Init() Preferences::AddBoolVarCache(&sBlockToplevelDataUriNavigations, "security.data_uri.block_toplevel_data_uri_navigations", false); + Preferences::AddBoolVarCache(&sBlockFTPSubresources, + "security.block_ftp_subresources", true); Preferences::AddBoolVarCache(&mOfflineMirrorsConnectivity, OFFLINE_MIRRORS_CONNECTIVITY, true); gIOService = this; @@ -1869,5 +1872,11 @@ nsIOService::BlockToplevelDataUriNavigations() return sBlockToplevelDataUriNavigations; } +/*static*/ bool +nsIOService::BlockFTPSubresources() +{ + return sBlockFTPSubresources; +} + } // namespace net } // namespace mozilla diff --git a/netwerk/base/nsIOService.h b/netwerk/base/nsIOService.h index 19eed743af..f3a26f5d28 100644 --- a/netwerk/base/nsIOService.h +++ b/netwerk/base/nsIOService.h @@ -94,6 +94,8 @@ public: static bool BlockToplevelDataUriNavigations(); + static bool BlockFTPSubresources(); + // Used to trigger a recheck of the captive portal status nsresult RecheckCaptivePortal(); private: @@ -175,6 +177,8 @@ private: static bool sBlockToplevelDataUriNavigations; + static bool sBlockFTPSubresources; + // Time a network tearing down started. mozilla::Atomic<PRIntervalTime> mNetTearingDownStarted; public: |