diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-30 23:54:01 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-30 23:54:01 +0200 |
commit | ba49a9898013aea17aff1c4706a3dfd3cd22cbf0 (patch) | |
tree | aa96b937b68f336862b101e5dc6c8dbcd1e56ee8 /docshell | |
parent | 23b91510e174c9b1a9a6b8bde73e90bd19f0b2b1 (diff) | |
download | uxp-ba49a9898013aea17aff1c4706a3dfd3cd22cbf0.tar.gz |
Bug 1359204 - Use SystemPrincipal as TriggeringPrincipal when loading page as view-source
Diffstat (limited to 'docshell')
-rw-r--r-- | docshell/base/nsDocShell.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 8f924567c3..b3e26da333 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -5689,6 +5689,11 @@ nsDocShell::LoadPage(nsISupports* aPageDescriptor, uint32_t aDisplayType) } shEntry->SetURI(newUri); shEntry->SetOriginalURI(nullptr); + // shEntry's current triggering principal is whoever loaded that page initially. + // But now we're doing another load of the page, via an API that is only exposed + // to system code. The triggering principal for this load should be the system + // principal. + shEntry->SetTriggeringPrincipal(nsContentUtils::GetSystemPrincipal()); } rv = LoadHistoryEntry(shEntry, LOAD_HISTORY); |