Title: [244281] trunk/Source/WebKit
Revision
244281
Author
[email protected]
Date
2019-04-15 12:49:08 -0700 (Mon, 15 Apr 2019)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (244280 => 244281)


--- trunk/Source/WebKit/ChangeLog	2019-04-15 19:46:34 UTC (rev 244280)
+++ trunk/Source/WebKit/ChangeLog	2019-04-15 19:49:08 UTC (rev 244281)
@@ -1,3 +1,16 @@
+2019-04-15  Devin Rousso  <[email protected]>
+
+        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.
+
 2019-04-15  Philippe Normand  <[email protected]>
 
         [GTK][WPE] Add enable-media websetting

Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (244280 => 244281)


--- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp	2019-04-15 19:46:34 UTC (rev 244280)
+++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp	2019-04-15 19:49:08 UTC (rev 244281)
@@ -1351,10 +1351,7 @@
         ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'httpOnly' was not found.");
 
     WebCookieManagerProxy* cookieManager = m_processPool->supplement<WebCookieManagerProxy>();
-
-    // FIXME: Using activeURL here twice is basically saying "this is always in the context of the main document"
-    // which probably isn't accurate.
-    cookieManager->setCookies(page->websiteDataStore().sessionID(), { cookie }, activeURL, activeURL, [callback = callback.copyRef()](CallbackBase::Error error) {
+    cookieManager->setCookies(page->websiteDataStore().sessionID(), { cookie }, [callback = callback.copyRef()](CallbackBase::Error error) {
         if (error == CallbackBase::Error::None)
             callback->sendSuccess();
         else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to