Closed Bug 1533584 Opened 6 months ago Closed 5 months ago

Enable capping the maximum life-time of client-side cookies to seven days on Nightly

Categories

(Core :: Privacy: Anti-Tracking, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

(Keywords: parity-safari, site-compat)

Attachments

(2 files)

This bug is filed to enable the feature landed in bug 1529836 for seven days on Nightly. Sending an intent to implement to dev-platform now...

Keywords: parity-safari
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/10c036ba7c48
Enable capping the maximum life-time of client-side cookies to seven days on Nightly; r=baku

Push with failures:
http://tinyurl.com/y6rl86lo
http://tinyurl.com/y6ydkpe2

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=235566390&repo=autoland&lineNumber=11819
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=235561003&repo=autoland&lineNumber=60642

Backout link: https://hg.mozilla.org/integration/autoland/rev/b93d00aab64923e7dbcebd06f422c50f4887e888

[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/get_named_cookie/get.py | test_get_named_cookie - AssertionError: assert 'Fri, 29 Mar 2019 21:32:38' == 'Sat, 21 Mar 2020 21:32:38'
[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO - session = <Session 905320a4-f9a0-4e3c-9faf-53dc4252dbcf>
[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO - url = <function url at 0x7fef227bc8c0>
[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO -
[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO - def test_get_named_cookie(session, url):
[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO - session.url = url("/common/blank.html")
[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO - clear_all_cookies(session)
[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO -
[task 2019-03-22T21:32:38.914Z] 21:32:38 INFO - # same formatting as Date.toUTCString() in javascript
[task 2019-03-22T21:32:38.915Z] 21:32:38 INFO - utc_string_format = "%a, %d %b %Y %H:%M:%S"
[task 2019-03-22T21:32:38.915Z] 21:32:38 INFO - a_year_from_now = (datetime.utcnow() + timedelta(days=365)).strftime(utc_string_format)
[task 2019-03-22T21:32:38.915Z] 21:32:38 INFO - session.execute_script("document.cookie = 'foo=bar;expires=%s'" % a_year_from_now)
[task 2019-03-22T21:32:38.915Z] 21:32:38 INFO -
[task 2019-03-22T21:32:38.915Z] 21:32:38 INFO - result = get_named_cookie(session, "foo")
[task 2019-03-22T21:32:38.915Z] 21:32:38 INFO - cookie = assert_success(result)
[task 2019-03-22T21:32:38.915Z] 21:32:38 INFO - assert isinstance(cookie, dict)
[task 2019-03-22T21:32:38.916Z] 21:32:38 INFO -
[task 2019-03-22T21:32:38.916Z] 21:32:38 INFO - assert "name" in cookie
[task 2019-03-22T21:32:38.916Z] 21:32:38 INFO - assert isinstance(cookie["name"], basestring)
[task 2019-03-22T21:32:38.916Z] 21:32:38 INFO - assert "value" in cookie
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - assert isinstance(cookie["value"], basestring)
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - assert "expiry" in cookie
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - assert isinstance(cookie["expiry"], (int, long))
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO -
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - assert cookie["name"] == "foo"
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - assert cookie["value"] == "bar"
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - # convert from seconds since epoch
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - > assert datetime.utcfromtimestamp(
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - cookie["expiry"]).strftime(utc_string_format) == a_year_from_now
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - E AssertionError: assert 'Fri, 29 Mar 2019 21:32:38' == 'Sat, 21 Mar 2020 21:32:38'
[task 2019-03-22T21:32:38.917Z] 21:32:38 INFO - E - Fri, 29 Mar 2019 21:32:38
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO - E ? ^^^ ^ ^^
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO - E + Sat, 21 Mar 2020 21:32:38
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO - E ? ^^^ ^ ^^
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO -
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO - a_year_from_now = 'Sat, 21 Mar 2020 21:32:38'
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO - cookie = {'domain': 'web-platform.test', 'expiry': 1553895158, 'httpOnly': False, 'name': 'foo', ...}
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO - result = <Responsetatus=200 body={"value": {"domain": "web-platform.test", "name": "foo..."expiry": 1553895158, "path": "/common/", "httpOnly": false, "secure": false}}>
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO - session = <Session 905320a4-f9a0-4e3c-9faf-53dc4252dbcf>
[task 2019-03-22T21:32:38.918Z] 21:32:38 INFO - url = <function url at 0x7fef227bc8c0>
[task 2019-03-22T21:32:38.919Z] 21:32:38 INFO - utc_string_format = '%a, %d %b %Y %H:%M:%S'

Flags: needinfo?(ehsan)
https://hg.mozilla.org/projects/ash/rev/10c036ba7c48082c3d2b93802384b8c756e82a73
Bug 1533584 - Enable capping the maximum life-time of client-side cookies to seven days on Nightly; r=baku
Depends on: 1541248
Depends on: 1541250
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf5234d6c121
Enable capping the maximum life-time of client-side cookies to seven days on Nightly; r=baku
Flags: needinfo?(ehsan)
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fa00c80a5c81
Enable capping the maximum life-time of client-side cookies to seven days on Nightly; r=baku
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dd68a6245f61
Enable capping the maximum life-time of client-side cookies to seven days on Nightly; r=baku
Flags: needinfo?(ehsan)
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/98064c475d2f
Part 2: Make sure browser_storage_listings.js does not depend on the value of the privacy.documentCookies.maxage pref
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.