WebKit Bugzilla
Attachment 347326 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]
fix
188617.diff (text/plain), 3.81 KB, created by
Basuke Suzuki
on 2018-08-16 17:03:59 PDT
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Basuke Suzuki
Created:
2018-08-16 17:03:59 PDT
Size:
3.81 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 66b2beb4493..4f21276bfe7 100644 >--- a/LayoutTests/platform/wincairo/TestExpectations >+++ b/LayoutTests/platform/wincairo/TestExpectations >@@ -918,7 +918,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 f049a7a0d35..204e3105cfd 100644 >--- a/Source/WebCore/platform/network/curl/CookieJarDB.cpp >+++ b/Source/WebCore/platform/network/curl/CookieJarDB.cpp >@@ -31,6 +31,8 @@ > #include "SQLiteFileSystem.h" > #include "URL.h" > >+#include <wtf/MonotonicTime.h> >+ > namespace WebCore { > > #define CORRUPT_MARKER_SUFFIX "-corrupted" >@@ -366,7 +368,7 @@ 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))) >+ if (!cookie.session && MonotonicTime::fromRawSeconds(cookie.expires) <= MonotonicTime::now()) > ret = deleteCookieInternal(cookie.name, cookie.domain, cookie.path); > else { > SQLiteStatement* statement = getPrepareStatement(SET_COOKIE_SQL); >@@ -378,7 +380,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 : static_cast<int64_t>(cookie.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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188617
:
347206
| 347326