Skip to content

Commit

Permalink
#525: improve message
Browse files Browse the repository at this point in the history
  • Loading branch information
classilla committed Nov 3, 2018
1 parent 9f91190 commit 5742c50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10596,15 +10596,17 @@ nsDocShell::DoURILoad(nsIURI* aURI,
// the principal, and thus does not have flags on the protocol that
// ask for it. If the load is for a data: URI, inherit the principal if
// the system principal initiated the load to maintain compatibility
// with addons, but warn the user as a penalty (TenFourFox issue 525).
// with addons (TenFourFox issue 525). This still maintains unique URIs
// for web content, so it's still an improvement over previously.
bool isData = false;
rv = aURI->SchemeIs("data", &isData);
if (NS_SUCCEEDED(rv) && isData) {
if (nsContentUtils::IsSystemPrincipal(triggeringPrincipal)) {
#if DEBUG
fprintf(stderr,
"Warning: TenFourFox enabling inherited principal for data: URI from system.\n"
"Warning: Make sure you are using a minimum set of up-to-date addons.\n"
);
#endif
inherit = true;
}
}
Expand Down

0 comments on commit 5742c50

Please sign in to comment.