WebKit Bugzilla
Attachment 347866 Details for
Bug 188852
: Improve compatibility with hyperlink auditing spec
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188852-20180822160221.patch (text/plain), 4.12 KB, created by
Brent Fulgham
on 2018-08-22 16:02:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2018-08-22 16:02:22 PDT
Size:
4.12 KB
patch
obsolete
>Subversion Revision: 235132 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 57b3451b1bc4b1035edcd9a6fa043238ac6e5a6d..1d6442f441ada3fc16899c423ca7288b8d3020e8 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2018-08-22 Brent Fulgham <bfulgham@apple.com> >+ >+ Improve compatibility with hyperlink auditing spec >+ https://bugs.webkit.org/show_bug.cgi?id=188852 >+ <rdar://problem/42572559> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implement the optional behavior to ignore hyperlink auditing directives. If the resource being >+ pinged has been previously flagged as prevalent, ignore the ping request. If the target URL >+ has been granted Storage Access API permissions, allow the ping. >+ >+ * NetworkProcess/PingLoad.cpp: >+ (WebKit::PingLoad::loadIsForPrevalentDomain const): >+ (WebKit::PingLoad::willPerformHTTPRedirection): >+ * NetworkProcess/PingLoad.h: >+ > 2018-08-21 Brent Fulgham <bfulgham@apple.com> > > Remove experimental affiliated domain code now that StorageAccess API is available >diff --git a/Source/WebKit/NetworkProcess/PingLoad.cpp b/Source/WebKit/NetworkProcess/PingLoad.cpp >index bdb4123c17527b676a692f2d9ccafd137878ae4f..521c62ddd3e1bd760f43d285396a95a15dfb0ec5 100644 >--- a/Source/WebKit/NetworkProcess/PingLoad.cpp >+++ b/Source/WebKit/NetworkProcess/PingLoad.cpp >@@ -31,6 +31,7 @@ > #include "NetworkLoadChecker.h" > #include "SessionTracker.h" > #include "WebErrors.h" >+#include <WebCore/PublicSuffix.h> > > #define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_parameters.sessionID.isAlwaysOnLoggingAllowed(), Network, "%p - PingLoad::" fmt, this, ##__VA_ARGS__) > >@@ -60,6 +61,10 @@ PingLoad::PingLoad(NetworkResourceLoadParameters&& parameters, WTF::CompletionHa > this->didFinish(result.error()); > return; > } >+ if (this->loadIsForPrevalentDomain(this->m_parameters.request.url())) { >+ this->didFinish(ResourceError { String { }, 0, this->m_parameters.request.url(), "Ping request to prevalent Domain"_s, ResourceError::Type::AccessControl }); >+ return; >+ } > this->loadRequest(WTFMove(result.value())); > }); > } >@@ -73,6 +78,23 @@ PingLoad::~PingLoad() > } > } > >+bool PingLoad::loadIsForPrevalentDomain(const URL& url) const >+{ >+#if HAVE(CFNETWORK_STORAGE_PARTITIONING) >+ if (auto* networkSession = SessionTracker::networkSession(m_parameters.sessionID)) { >+ ASSERT(m_parameters.sourceOrigin); >+ URL sourceOrigin(URL(), m_parameters.sourceOrigin->host()); >+ sourceOrigin.setProtocol(m_parameters.sourceOrigin->protocol()); >+ >+ return networkSession->networkStorageSession().shouldBlockCookies(sourceOrigin, url, m_parameters.webPageID, m_parameters.webFrameID); >+ } >+ >+ ASSERT_NOT_REACHED(); >+#endif >+ >+ return false; >+} >+ > void PingLoad::didFinish(const ResourceError& error, const ResourceResponse& response) > { > m_completionHandler(error, response); >@@ -107,6 +129,11 @@ void PingLoad::willPerformHTTPRedirection(ResourceResponse&& redirectResponse, R > return; > } > >+ if (this->loadIsForPrevalentDomain(request.url())) { >+ this->didFinish(ResourceError { String { }, 0, request.url(), "Redirection to prevalent Domain"_s, ResourceError::Type::AccessControl }); >+ return; >+ } >+ > completionHandler(WTFMove(request)); > }); > } >diff --git a/Source/WebKit/NetworkProcess/PingLoad.h b/Source/WebKit/NetworkProcess/PingLoad.h >index e47bf1733121b710beb5e5b3ff1ae61d8c4ebffe..98d25065a995387af6289a3bd69308e759fe1239 100644 >--- a/Source/WebKit/NetworkProcess/PingLoad.h >+++ b/Source/WebKit/NetworkProcess/PingLoad.h >@@ -67,7 +67,9 @@ private: > void loadRequest(WebCore::ResourceRequest&&); > > void didFinish(const WebCore::ResourceError& = { }, const WebCore::ResourceResponse& response = { }); >- >+ >+ bool loadIsForPrevalentDomain(const URL&) const; >+ > NetworkResourceLoadParameters m_parameters; > WTF::CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)> m_completionHandler; > RefPtr<NetworkDataTask> m_task;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188852
:
347840
|
347842
|
347851
|
347866
|
347929
|
347945
|
347949
|
347954
|
347975
|
347977
|
348015
|
388786