Title: [216292] trunk
- Revision
- 216292
- Author
- [email protected]
- Date
- 2017-05-05 16:45:05 -0700 (Fri, 05 May 2017)
Log Message
[Cocoa] Converting from WebCore::Cookie to NSHTTPCookie always marks cookies as session cookies
https://bugs.webkit.org/show_bug.cgi?id=171748
<rdar://problem/32027327>
Reviewed by Michael Catanzaro.
Source/WebCore:
The function that we use to convert from WebCore::Cookie to NSHTTPCookie was
also misusing the NSHTTPCookieDiscard property. If any value is provided for
this key, even @NO, CFNetwork interprets that to mean that the cookie has the
"session" flag.
This is known to affect cookies set via WebCookieManager, WKHTTPCookieStore,
and WebAutomationSession.
This is covered by existing test WebKit2.WKHTTPCookieStore.
* platform/network/cocoa/CookieCocoa.mm:
(WebCore::Cookie::operator NSHTTPCookie *):
Don't include the property if the cookie is not a session cookie.
Tools:
Remove temporary workaround now that the assertion failure is fixed.
* TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:
(TEST):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (216291 => 216292)
--- trunk/Source/WebCore/ChangeLog 2017-05-05 23:39:19 UTC (rev 216291)
+++ trunk/Source/WebCore/ChangeLog 2017-05-05 23:45:05 UTC (rev 216292)
@@ -1,3 +1,25 @@
+2017-05-05 Brian Burg <[email protected]>
+
+ [Cocoa] Converting from WebCore::Cookie to NSHTTPCookie always marks cookies as session cookies
+ https://bugs.webkit.org/show_bug.cgi?id=171748
+ <rdar://problem/32027327>
+
+ Reviewed by Michael Catanzaro.
+
+ The function that we use to convert from WebCore::Cookie to NSHTTPCookie was
+ also misusing the NSHTTPCookieDiscard property. If any value is provided for
+ this key, even @NO, CFNetwork interprets that to mean that the cookie has the
+ "session" flag.
+
+ This is known to affect cookies set via WebCookieManager, WKHTTPCookieStore,
+ and WebAutomationSession.
+
+ This is covered by existing test WebKit2.WKHTTPCookieStore.
+
+ * platform/network/cocoa/CookieCocoa.mm:
+ (WebCore::Cookie::operator NSHTTPCookie *):
+ Don't include the property if the cookie is not a session cookie.
+
2017-05-05 Youenn Fablet <[email protected]>
TURNS gathering is not working properly
Modified: trunk/Source/WebCore/platform/network/cocoa/CookieCocoa.mm (216291 => 216292)
--- trunk/Source/WebCore/platform/network/cocoa/CookieCocoa.mm 2017-05-05 23:39:19 UTC (rev 216291)
+++ trunk/Source/WebCore/platform/network/cocoa/CookieCocoa.mm 2017-05-05 23:45:05 UTC (rev 216292)
@@ -98,7 +98,9 @@
if (secure)
[properties setObject:@YES forKey:NSHTTPCookieSecure];
- [properties setObject:(session ? @"TRUE" : @"FALSE") forKey:NSHTTPCookieDiscard];
+ if (session)
+ [properties setObject:@YES forKey:NSHTTPCookieDiscard];
+
[properties setObject:@"1" forKey:NSHTTPCookieVersion];
return [NSHTTPCookie cookieWithProperties:properties];
Modified: trunk/Tools/ChangeLog (216291 => 216292)
--- trunk/Tools/ChangeLog 2017-05-05 23:39:19 UTC (rev 216291)
+++ trunk/Tools/ChangeLog 2017-05-05 23:45:05 UTC (rev 216292)
@@ -1,3 +1,16 @@
+2017-05-05 Brian Burg <[email protected]>
+
+ [Cocoa] Converting from WebCore::Cookie to NSHTTPCookie always marks cookies as session cookies
+ https://bugs.webkit.org/show_bug.cgi?id=171748
+ <rdar://problem/32027327>
+
+ Reviewed by Michael Catanzaro.
+
+ Remove temporary workaround now that the assertion failure is fixed.
+
+ * TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:
+ (TEST):
+
2017-05-05 Simon Fraser <[email protected]>
Make it possible to test rotation in iOS WebKitTestRunner
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm (216291 => 216292)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm 2017-05-05 23:39:19 UTC (rev 216291)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm 2017-05-05 23:45:05 UTC (rev 216292)
@@ -131,8 +131,7 @@
ASSERT_TRUE([cookie2.get().name isEqualToString:cookie.name]);
ASSERT_TRUE([cookie2.get().domain isEqualToString:cookie.domain]);
ASSERT_FALSE(cookie.secure);
- // FIXME: this should be ASSERT_FALSE. Investigating in <https://bugs.webkit.org/show_bug.cgi?id=171748>.
- ASSERT_TRUE(cookie.sessionOnly);
+ ASSERT_FALSE(cookie.sessionOnly);
}
}
[cookies release];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes