Commit bb85ae41 authored by Sebastian Streich's avatar Sebastian Streich
Browse files

Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug

parent 9ce86dc5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,3 +26,4 @@ SANDBOX_KEYWORD("allow-popups-to-escape-sandbox", allowpopupstoescapesandbox,
SANDBOX_KEYWORD("allow-presentation", allowpresentation, SANDBOXED_PRESENTATION)
SANDBOX_KEYWORD("allow-storage-access-by-user-activation",
                allowstorageaccessbyuseractivatetion, SANDBOXED_STORAGE_ACCESS)
SANDBOX_KEYWORD("allow-downloads", allowdownloads, SANDBOXED_ALLOW_DOWNLOADS)
+8 −1
Original line number Diff line number Diff line
@@ -116,5 +116,12 @@ const unsigned long SANDBOXED_PRESENTATION = 0x4000;
 */
const unsigned long SANDBOXED_STORAGE_ACCESS = 0x8000;

const unsigned long SANDBOX_ALL_FLAGS = 0xFFFF;
/**
 * This flag disables content from initiating or instantiating downloads,
 * whether through downloading hyperlinks or through navigation that gets
 * handled as a download.
 */
const unsigned long SANDBOXED_ALLOW_DOWNLOADS = 0x10000;

const unsigned long SANDBOX_ALL_FLAGS = 0xFFFFFF;
#endif
+3 −0
Original line number Diff line number Diff line
@@ -133,3 +133,6 @@ HTTPSOnlyUpgradeRequest = Upgrading insecure request “%1$S” to use “%2$S
HTTPSOnlyNoUpgradeException = Not upgrading insecure request “%1$S” because it is exempt.
# LOCALIZATION NOTE: %1$S is the URL of the failed request; %2$S is an error-code.
HTTPSOnlyFailedRequest = Upgrading insecure request “%1$S” failed. (%2$S)

IframeSandboxBlockedDownload = Download was blocked because the triggering iframe has the sandbox flag set.
IframeSandboxDeprecatedDownload = Downloading content inside sandboxed iframes is deprecated and will be blocked soon.
+6 −0
Original line number Diff line number Diff line
@@ -1433,6 +1433,12 @@
  value: true
  mirror: always

# Block all downloads in iframes with the sandboxed attribute
- name: dom.block_download_in_sandboxed_iframes
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Block multiple window.open() per single event.
- name: dom.block_multiple_popups
  type: bool
+1 −1
Original line number Diff line number Diff line
prefs: [dom.targetBlankNoOpener.enabled:false]
prefs: [dom.targetBlankNoOpener.enabled:false, dom.block_download_in_sandboxed_iframes:true ]
Loading