Bug 188617

Summary: [Curl] Bug fix on deleting cookies when Max-Age is set to zero.
Product: WebKit Reporter: Basuke Suzuki <Basuke.Suzuki>
Component: PlatformAssignee: Basuke Suzuki <Basuke.Suzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, Basuke.Suzuki, commit-queue, darin, ews-watchlist, galpeter, Hironori.Fujii, pvollan, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
PATCH
achristensen: review-
fix none

Description Basuke Suzuki 2018-08-15 13:44:54 PDT
Those cookies whose Max-Age is set to zero must be erased, but there's a bug in the condition.
Comment 1 Basuke Suzuki 2018-08-15 13:48:56 PDT
Created attachment 347206 [details]
PATCH
Comment 2 Alex Christensen 2018-08-16 16:25:34 PDT
Comment on attachment 347206 [details]
PATCH

View in context: https://bugs.webkit.org/attachment.cgi?id=347206&action=review

> Source/WebCore/platform/network/curl/CookieJarDB.cpp:352
> +    if (!cookie.session && expires <= ::time(0))

There are better ways of getting the current time in WebCore, like MonotonicTime::now
Comment 3 Basuke Suzuki 2018-08-16 16:30:16 PDT
Comment on attachment 347206 [details]
PATCH

View in context: https://bugs.webkit.org/attachment.cgi?id=347206&action=review

>> Source/WebCore/platform/network/curl/CookieJarDB.cpp:352
>> +    if (!cookie.session && expires <= ::time(0))
> 
> There are better ways of getting the current time in WebCore, like MonotonicTime::now

Alright. Thanks!
Comment 4 Basuke Suzuki 2018-08-16 17:03:59 PDT
Created attachment 347326 [details]
fix
Comment 5 WebKit Commit Bot 2018-08-16 17:50:22 PDT
Comment on attachment 347326 [details]
fix

Clearing flags on attachment: 347326

Committed r234973: <https://trac.webkit.org/changeset/234973>
Comment 6 WebKit Commit Bot 2018-08-16 17:50:24 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-08-16 17:52:26 PDT
<rdar://problem/43403772>