Bug 1775006 - Skip tainted origin check for TRRServiceChannel, r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D154652
This commit is contained in:
Kershaw Chang 2022-08-17 09:34:42 +00:00
Родитель 81834d4c58
Коммит 600d02ef1b
2 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -558,6 +558,9 @@ class HttpBaseChannel : public nsHashPropertyBag,
[[nodiscard]] virtual nsresult SetupReplacementChannel(
nsIURI*, nsIChannel*, bool preserveMethod, uint32_t redirectFlags);
// WHATWG Fetch Standard 4.4. HTTP-redirect fetch, step 10
virtual bool ShouldTaintReplacementChannelOrigin(nsIURI* aNewURI);
// bundle calling OMR observers and marking flag into one function
inline void CallOnModifyRequestObservers() {
gHttpHandler->OnModifyRequest(this);
@ -640,9 +643,6 @@ class HttpBaseChannel : public nsHashPropertyBag,
nsCOMPtr<nsIEventTarget> mCurrentThread;
private:
// WHATWG Fetch Standard 4.4. HTTP-redirect fetch, step 10
bool ShouldTaintReplacementChannelOrigin(nsIURI* aNewURI);
// Proxy release all members above on main thread.
void ReleaseMainThreadOnlyReferences();

Просмотреть файл

@ -137,7 +137,10 @@ class TRRServiceChannel : public HttpBaseChannel,
[[nodiscard]] virtual nsresult SetupReplacementChannel(
nsIURI* aNewURI, nsIChannel* aNewChannel, bool aPreserveMethod,
uint32_t aRedirectFlags) override;
// Skip this check for TRRServiceChannel.
virtual bool ShouldTaintReplacementChannelOrigin(nsIURI* aNewURI) override {
return false;
}
virtual bool SameOriginWithOriginalUri(nsIURI* aURI) override;
bool DispatchRelease();