Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Issue 2424443002: When parsing cookie expiration times, saturate out of range dates (Closed)

Created:
4 years, 2 months ago by mmenke
Modified:
4 years, 2 months ago
Reviewers:
Devlin, eroman
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, cbentzel+watch_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

When parsing cookie expiration times, saturate out of range dates rather than reject them. Roughly this means cookie expiration times prior to 1970 on (non-OSX) POSIX, or after 2038 on 32-bit (non-OSX) POSIX, will now be interpreted as either very small or very large base::Time values. BUG=649416 Committed: https://crrev.com/93cde27c80e7119c5a076ea61f59cc5bd473d219 Cr-Commit-Position: refs/heads/master@{#426213}

Patch Set 1 : Eroman's original CL #

Patch Set 2 : Fix test, use more accurate overflow values. #

Patch Set 3 : Update comment #

Patch Set 4 : Merge #

Total comments: 8

Patch Set 5 : Response to comments, update comment #

Total comments: 8

Patch Set 6 : Response to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -85 lines) Patch
M extensions/browser/api/web_request/web_request_api_helpers.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M net/cookies/canonical_cookie.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/cookies/canonical_cookie.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/cookies/cookie_monster_store_test.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M net/cookies/cookie_util.h View 1 2 3 4 5 1 chunk +13 lines, -2 lines 0 comments Download
M net/cookies/cookie_util.cc View 1 2 3 4 5 3 chunks +80 lines, -8 lines 0 comments Download
M net/cookies/cookie_util_unittest.cc View 1 2 3 4 5 2 chunks +121 lines, -69 lines 0 comments Download

Messages

Total messages: 41 (26 generated)
mmenke
Eric: WDYT? Saturating to base::Time::Max() seems wrong, since base::Time::Max() is not the value which FromExploded ...
4 years, 2 months ago (2016-10-17 22:05:41 UTC) #12
eroman
https://codereview.chromium.org/2424443002/diff/60001/net/cookies/cookie_util.cc File net/cookies/cookie_util.cc (right): https://codereview.chromium.org/2424443002/diff/60001/net/cookies/cookie_util.cc#newcode57 net/cookies/cookie_util.cc:57: #if defined(OS_POSIX) && !defined(OS_MACOSX) What is the range on ...
4 years, 2 months ago (2016-10-18 21:52:55 UTC) #17
eroman
On Mon, Oct 17, 2016 at 3:05 PM, <mmenke@chromium.org> wrote: > Reviewers: eroman > CL: ...
4 years, 2 months ago (2016-10-18 22:00:36 UTC) #18
mmenke
Thanks for the feedback! On 2016/10/18 22:00:36, eroman wrote: > On Mon, Oct 17, 2016 ...
4 years, 2 months ago (2016-10-18 22:18:14 UTC) #19
mmenke
Grr....git cl upload blocked uploading a CL on an owners whine. Uploaded now.
4 years, 2 months ago (2016-10-18 22:23:55 UTC) #20
eroman
lgtm with nits https://codereview.chromium.org/2424443002/diff/80001/net/cookies/cookie_util.cc File net/cookies/cookie_util.cc (right): https://codereview.chromium.org/2424443002/diff/80001/net/cookies/cookie_util.cc#newcode34 net/cookies/cookie_util.cc:34: // * Time::Max() as the maximum ...
4 years, 2 months ago (2016-10-18 22:55:19 UTC) #23
mmenke
Thanks for the feedback! https://codereview.chromium.org/2424443002/diff/80001/net/cookies/cookie_util.cc File net/cookies/cookie_util.cc (right): https://codereview.chromium.org/2424443002/diff/80001/net/cookies/cookie_util.cc#newcode34 net/cookies/cookie_util.cc:34: // * Time::Max() as the ...
4 years, 2 months ago (2016-10-19 14:45:31 UTC) #26
mmenke
[+rdevlin.cronin]: TBRing you for extensions/browser/api/web_request/web_request_api_helpers.cc - This CL just renames a method it calls, and ...
4 years, 2 months ago (2016-10-19 14:47:45 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2424443002/100001
4 years, 2 months ago (2016-10-19 14:50:08 UTC) #32
Devlin
extensions lgtm
4 years, 2 months ago (2016-10-19 14:50:39 UTC) #33
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-19 16:07:48 UTC) #36
huangs
The new test CookieUtilTest.ParseCookieExpirationTimeBeyond2038 is failing on "Linux test dbg" bot: https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%281%29%2832%29/builds/34643
4 years, 2 months ago (2016-10-19 17:47:52 UTC) #37
huangs
Going to revert this; sorry for the trouble!
4 years, 2 months ago (2016-10-19 17:48:58 UTC) #38
huangs
A revert of this CL (patchset #6 id:100001) has been created in https://chromiumcodereview.appspot.com/2433193002/ by huangs@chromium.org. ...
4 years, 2 months ago (2016-10-19 17:49:28 UTC) #39
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:09:06 UTC) #41
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/93cde27c80e7119c5a076ea61f59cc5bd473d219
Cr-Commit-Position: refs/heads/master@{#426213}

Powered by Google App Engine
This is Rietveld 408576698