Skip to content

Commit

Permalink
[IPC][Hardening] Validate URLs sent by the WebProcess via the WebPage…
Browse files Browse the repository at this point in the history
…Proxy::DidFailProvisionalLoad IPC

https://bugs.webkit.org/show_bug.cgi?id=258322
rdar://112940737

Reviewed by Brent Fulgham.

Validate URLs sent by the WebProcess via the WebPageProxy::DidFailProvisionalLoad IPC.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):

Originally-landed-as: 259548.842@safari-7615-branch (e6347f3). rdar://111059792
Canonical link: https://commits.webkit.org/266403@main
  • Loading branch information
cdumez authored and robert-jenner committed Jul 28, 2023
1 parent 01d1f20 commit ddeb323
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/WebKit/UIProcess/WebPageProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5570,6 +5570,9 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " in web process pid %i didFailProvisionalLoadForFrame to provisionalURL %s", internals().identifier.toUInt64(), process->processID(), provisionalURL.utf8().data());
WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "didFailProvisionalLoadForFrame: frameID=%" PRIu64 ", isMainFrame=%d, domain=%s, code=%d, isMainFrame=%d, willInternallyHandleFailure=%d", frame.frameID().object().toUInt64(), frame.isMainFrame(), error.domain().utf8().data(), error.errorCode(), frame.isMainFrame(), willInternallyHandleFailure == WillInternallyHandleFailure::Yes);

MESSAGE_CHECK_URL(process, provisionalURL);
MESSAGE_CHECK_URL(process, error.failingURL());

PageClientProtector protector(pageClient());

if (m_controlledByAutomation) {
Expand Down

0 comments on commit ddeb323

Please sign in to comment.