Changeset 232031 in webkit


Ignore:
Timestamp:
May 21, 2018 3:10:35 PM (6 years ago)
Author:
BJ Burg
Message:

Web Automation: always return an empty cookie list if document.cookieURL() is empty
https://bugs.webkit.org/show_bug.cgi?id=185838
<rdar://problem/37737526>

Reviewed by Tim Horton.

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
This crashes in CFNetwork code because an empty cookie URL is not a valid input.
Just return an empty list since there couldn't be any cookies returned.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r232028 r232031  
     12018-05-21  Brian Burg  <bburg@apple.com>
     2
     3        Web Automation: always return an empty cookie list if document.cookieURL() is empty
     4        https://bugs.webkit.org/show_bug.cgi?id=185838
     5        <rdar://problem/37737526>
     6
     7        Reviewed by Tim Horton.
     8
     9        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
     10        (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
     11        This crashes in CFNetwork code because an empty cookie URL is not a valid input.
     12        Just return an empty list since there couldn't be any cookies returned.
     13
    1142018-05-21  Brian Burg  <bburg@apple.com>
    215
  • trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp

    r230211 r232031  
    752752    auto& document = *frame->coreFrame()->document();
    753753    Vector<WebCore::Cookie> foundCookies;
    754     WebCore::getRawCookies(document, document.cookieURL(), foundCookies);
     754    if (!document.cookieURL().isEmpty())
     755        WebCore::getRawCookies(document, document.cookieURL(), foundCookies);
    755756
    756757    WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidGetCookiesForFrame(callbackID, foundCookies, String()), 0);
Note: See TracChangeset for help on using the changeset viewer.