#525: improve message

This commit is contained in:
Cameron Kaiser 2018-11-02 20:55:56 -07:00
parent 9f9119069f
commit 5742c507e0
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}
}