Bug 188617 - [Curl] Bug fix on deleting cookies when Max-Age is set to zero.
Summary: [Curl] Bug fix on deleting cookies when Max-Age is set to zero.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Basuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-15 13:44 PDT by Basuke Suzuki
Modified: 2018-08-16 17:52 PDT (History)
10 users (show)

See Also:


Attachments
PATCH (3.63 KB, patch)
2018-08-15 13:48 PDT, Basuke Suzuki
achristensen: review-
Details | Formatted Diff | Diff
fix (3.81 KB, patch)
2018-08-16 17:03 PDT, Basuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>