diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 18:51:38 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 18:51:38 +0200 |
commit | 1b4c4256ee7705724b02919b4d432b2a391bcd04 (patch) | |
tree | ba2e9442b55afaa4288c096ae81ca64c8523b3c2 /netwerk/base/nsIOService.cpp | |
parent | c30ebdac27c93b57e368c69e9c13055a17229992 (diff) | |
download | UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.tar UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.tar.gz UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.tar.lz UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.tar.xz UXP-1b4c4256ee7705724b02919b4d432b2a391bcd04.zip |
moebius#223: Consider blocking top level window data: URIs (part 1/3 without tests)
https://github.com/MoonchildProductions/moebius/pull/223
Diffstat (limited to 'netwerk/base/nsIOService.cpp')
-rw-r--r-- | netwerk/base/nsIOService.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp index 0da79c18a..8b7f31f99 100644 --- a/netwerk/base/nsIOService.cpp +++ b/netwerk/base/nsIOService.cpp @@ -173,6 +173,8 @@ uint32_t nsIOService::gDefaultSegmentCount = 24; bool nsIOService::sTelemetryEnabled = false; +bool nsIOService::sBlockToplevelDataUriNavigations = false; + //////////////////////////////////////////////////////////////////////////////// nsIOService::nsIOService() @@ -251,6 +253,8 @@ nsIOService::Init() NS_WARNING("failed to get observer service"); Preferences::AddBoolVarCache(&sTelemetryEnabled, "toolkit.telemetry.enabled", false); + Preferences::AddBoolVarCache(&sBlockToplevelDataUriNavigations, + "security.data_uri.block_toplevel_data_uri_navigations", false); Preferences::AddBoolVarCache(&mOfflineMirrorsConnectivity, OFFLINE_MIRRORS_CONNECTIVITY, true); gIOService = this; @@ -1876,5 +1880,11 @@ nsIOService::SpeculativeAnonymousConnect2(nsIURI *aURI, return SpeculativeConnectInternal(aURI, aPrincipal, aCallbacks, true); } +/*static*/ bool +nsIOService::BlockToplevelDataUriNavigations() +{ + return sBlockToplevelDataUriNavigations; +} + } // namespace net } // namespace mozilla |