Changeset 244281 in webkit


Ignore:
Timestamp:
Apr 15, 2019 12:49:08 PM (5 years ago)
Author:
Devin Rousso
Message:

WebDriver: Set Cookie endpoint does not correctly set subdomain cookies
https://bugs.webkit.org/show_bug.cgi?id=196872
<rdar://problem/49233240>

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::addSingleCookie):
Rather than try to "force" the cookie to be set on the current active URL, use the cookie
itself to figure out which domain it should be set on.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r244260 r244281  
     12019-04-15  Devin Rousso  <drousso@apple.com>
     2
     3        WebDriver: Set Cookie endpoint does not correctly set subdomain cookies
     4        https://bugs.webkit.org/show_bug.cgi?id=196872
     5        <rdar://problem/49233240>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * UIProcess/Automation/WebAutomationSession.cpp:
     10        (WebKit::WebAutomationSession::addSingleCookie):
     11        Rather than try to "force" the cookie to be set on the current active URL, use the cookie
     12        itself to figure out which domain it should be set on.
     13
    1142019-04-15  Philippe Normand  <pnormand@igalia.com>
    215
  • trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp

    r244230 r244281  
    13521352
    13531353    WebCookieManagerProxy* cookieManager = m_processPool->supplement<WebCookieManagerProxy>();
    1354 
    1355     // FIXME: Using activeURL here twice is basically saying "this is always in the context of the main document"
    1356     // which probably isn't accurate.
    1357     cookieManager->setCookies(page->websiteDataStore().sessionID(), { cookie }, activeURL, activeURL, [callback = callback.copyRef()](CallbackBase::Error error) {
     1354    cookieManager->setCookies(page->websiteDataStore().sessionID(), { cookie }, [callback = callback.copyRef()](CallbackBase::Error error) {
    13581355        if (error == CallbackBase::Error::None)
    13591356            callback->sendSuccess();
Note: See TracChangeset for help on using the changeset viewer.