WebKit Bugzilla
Attachment 347206 Details for
Bug 188617
: [Curl] Bug fix on deleting cookies when Max-Age is set to zero.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
PATCH
188617.diff (text/plain), 3.63 KB, created by
Basuke Suzuki
on 2018-08-15 13:48:56 PDT
(
hide
)
Description:
PATCH
Filename:
MIME Type:
Creator:
Basuke Suzuki
Created:
2018-08-15 13:48:56 PDT
Size:
3.63 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index ee74960aa01..5c8545f8f78 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-08-15 Basuke Suzuki <Basuke.Suzuki@sony.com> >+ >+ [Curl] Bug fix on deleting cookies when Max-Age is set to zero. >+ https://bugs.webkit.org/show_bug.cgi?id=188617 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/wincairo/TestExpectations: >+ - http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html [ Pass ] >+ > 2018-08-14 Antoine Quint <graouts@apple.com> > > [Web Animations] Crash under AnimationTimeline::cancelOrRemoveDeclarativeAnimation() >diff --git a/LayoutTests/platform/wincairo/TestExpectations b/LayoutTests/platform/wincairo/TestExpectations >index a5463c9cf20..f0fec0f4728 100644 >--- a/LayoutTests/platform/wincairo/TestExpectations >+++ b/LayoutTests/platform/wincairo/TestExpectations >@@ -925,7 +925,6 @@ http/tests/websocket/tests/hybi/secure-cookie-secure-connection.pl [ Failure ] > http/tests/websocket/tests/hybi/upgrade-simple-ws.html [ Pass Failure ] > http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party.html [ Failure ] > http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party.html [ Failure ] >-http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html [ Failure ] > http/tests/websocket/tests/hybi/workers/close.html [ Pass Failure ] > > # There is not NetworkProcess in WK1, so it can't crash. >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index af596853ede..11e7e2ce0d8 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-08-15 Basuke Suzuki <Basuke.Suzuki@sony.com> >+ >+ [Curl] Bug fix on deleting cookies when Max-Age is set to zero. >+ https://bugs.webkit.org/show_bug.cgi?id=188617 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Delete cookie if Max-Age is set to zero in Set-Cookie. Original implementation was >+ compared using "less than", but it must be "less than or equal" to zero. >+ >+ Tests: http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html >+ >+ * platform/network/curl/CookieJarDB.cpp: >+ (WebCore::CookieJarDB::setCookie): >+ > 2018-08-14 Ali Juma <ajuma@chromium.org> > > Follow-up: [IntersectionObserver] Implement rootMargin parsing >diff --git a/Source/WebCore/platform/network/curl/CookieJarDB.cpp b/Source/WebCore/platform/network/curl/CookieJarDB.cpp >index 0da5d1c7a1c..518431a8510 100644 >--- a/Source/WebCore/platform/network/curl/CookieJarDB.cpp >+++ b/Source/WebCore/platform/network/curl/CookieJarDB.cpp >@@ -348,7 +348,8 @@ bool CookieJarDB::hasHttpOnlyCookie(const String& name, const String& domain, co > int CookieJarDB::setCookie(const Cookie& cookie) > { > int ret = 0; >- if (!cookie.session && (cookie.expires < ::time(0))) >+ auto expires = static_cast<int64_t>(cookie.expires); >+ if (!cookie.session && expires <= ::time(0)) > ret = deleteCookieInternal(cookie.name, cookie.domain, cookie.path); > else { > SQLiteStatement* statement = getPrepareStatement(SET_COOKIE_SQL); >@@ -360,7 +361,7 @@ int CookieJarDB::setCookie(const Cookie& cookie) > statement->bindText(2, cookie.value); > statement->bindText(3, cookie.domain); > statement->bindText(4, cookie.path); >- statement->bindInt64(5, cookie.session ? 0 : (int64_t)cookie.expires); >+ statement->bindInt64(5, cookie.session ? 0 : expires); > statement->bindInt(6, cookie.value.length()); > statement->bindInt(7, cookie.session ? 1 : 0); > statement->bindInt(8, cookie.httpOnly ? 1 : 0);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
achristensen
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188617
:
347206
|
347326