diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 22:16:58 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 22:16:58 +0200 |
commit | 13f3978a14cb90eb01fc7f185f62b2ee2ac9f466 (patch) | |
tree | 1f59b2ec96124bb182f34bd6d8222e012656a1c0 /docshell/base/nsDocShell.cpp | |
parent | ee4f7c4aa17068cfda347fb6ce51ca0b1958fbb6 (diff) | |
download | UXP-13f3978a14cb90eb01fc7f185f62b2ee2ac9f466.tar UXP-13f3978a14cb90eb01fc7f185f62b2ee2ac9f466.tar.gz UXP-13f3978a14cb90eb01fc7f185f62b2ee2ac9f466.tar.lz UXP-13f3978a14cb90eb01fc7f185f62b2ee2ac9f466.tar.xz UXP-13f3978a14cb90eb01fc7f185f62b2ee2ac9f466.zip |
Revert "Bug 1182569 - Skip security check for plugins using newstream attribute"
This reverts commit 5b0f4649b3fee771379af60ec04d43b8a525cf80.
Diffstat (limited to 'docshell/base/nsDocShell.cpp')
-rw-r--r-- | docshell/base/nsDocShell.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 8167a76ec..6810d0179 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -13888,8 +13888,7 @@ public: const nsAString& aFileName, nsIInputStream* aPostDataStream, nsIInputStream* aHeadersDataStream, - bool aIsTrusted, - nsIPrincipal* aTriggeringPrincipal); + bool aIsTrusted); NS_IMETHOD Run() override { @@ -13905,7 +13904,7 @@ public: mHandler->OnLinkClickSync(mContent, mURI, mTargetSpec.get(), mFileName, mPostDataStream, mHeadersDataStream, - nullptr, nullptr, mTriggeringPrincipal); + nullptr, nullptr); } return NS_OK; } @@ -13920,7 +13919,6 @@ private: nsCOMPtr<nsIContent> mContent; PopupControlState mPopupState; bool mIsTrusted; - nsCOMPtr<nsIPrincipal> mTriggeringPrincipal; }; OnLinkClickEvent::OnLinkClickEvent(nsDocShell* aHandler, @@ -13930,8 +13928,7 @@ OnLinkClickEvent::OnLinkClickEvent(nsDocShell* aHandler, const nsAString& aFileName, nsIInputStream* aPostDataStream, nsIInputStream* aHeadersDataStream, - bool aIsTrusted, - nsIPrincipal* aTriggeringPrincipal) + bool aIsTrusted) : mHandler(aHandler) , mURI(aURI) , mTargetSpec(aTargetSpec) @@ -13941,7 +13938,6 @@ OnLinkClickEvent::OnLinkClickEvent(nsDocShell* aHandler, , mContent(aContent) , mPopupState(mHandler->mScriptGlobal->GetPopupControlState()) , mIsTrusted(aIsTrusted) - , mTriggeringPrincipal(aTriggeringPrincipal) { } @@ -13952,8 +13948,7 @@ nsDocShell::OnLinkClick(nsIContent* aContent, const nsAString& aFileName, nsIInputStream* aPostDataStream, nsIInputStream* aHeadersDataStream, - bool aIsTrusted, - nsIPrincipal* aTriggeringPrincipal) + bool aIsTrusted) { NS_ASSERTION(NS_IsMainThread(), "wrong thread"); @@ -13992,8 +13987,7 @@ nsDocShell::OnLinkClick(nsIContent* aContent, nsCOMPtr<nsIRunnable> ev = new OnLinkClickEvent(this, aContent, aURI, target.get(), aFileName, - aPostDataStream, aHeadersDataStream, - aIsTrusted, aTriggeringPrincipal); + aPostDataStream, aHeadersDataStream, aIsTrusted); return NS_DispatchToCurrentThread(ev); } @@ -14005,8 +13999,7 @@ nsDocShell::OnLinkClickSync(nsIContent* aContent, nsIInputStream* aPostDataStream, nsIInputStream* aHeadersDataStream, nsIDocShell** aDocShell, - nsIRequest** aRequest, - nsIPrincipal* aTriggeringPrincipal) + nsIRequest** aRequest) { // Initialize the DocShell / Request if (aDocShell) { @@ -14129,18 +14122,13 @@ nsDocShell::OnLinkClickSync(nsIContent* aContent, return NS_ERROR_OUT_OF_MEMORY; } - // if the triggeringPrincipal is not passed explicitly, then we - // fall back to using doc->NodePrincipal() as the triggeringPrincipal. - nsCOMPtr<nsIPrincipal> triggeringPrincipal = - aTriggeringPrincipal ? aTriggeringPrincipal - : aContent->NodePrincipal(); - nsresult rv = InternalLoad(clonedURI, // New URI nullptr, // Original URI false, // LoadReplace referer, // Referer URI refererPolicy, // Referer policy - triggeringPrincipal, + aContent->NodePrincipal(), // Triggering is our node's + // principal aContent->NodePrincipal(), flags, target, // Window target |