core icon indicating copy to clipboard operation
core copied to clipboard

Cookies are not respecting the expire parameter

Open bryanboza opened this issue 11 years ago • 5 comments

When you create a new cookie and include the expire parameter, the system is sending incomplete and convert this in a session cookie

  • Make sure you don't have browser cookies, and you don't have a username cookie.
  • In JS console execute: document.cookie="username=JohnDoe; expires=Thu, 18 Dec 2016 12:00:00 UTC; path=/";
  • In browser cookies you have a username cookie expiring in Dec 2016.
  • Refresh page
  • Now your cookie turned into session cookie because server is sending this: Set-Cookie: username=JohnDoe;Path=/

Here the SC: Before refresh: 2015-06-23_0927 After refresh: 2015-06-23_0928

Tested in the last 3.2.1 // Postgres // FF

bryanboza avatar Jun 23 '15 15:06 bryanboza

I can confirm this behavior on my local 3.2 instance. The behavior is not unique to the name of the cookie, I also tried it was "test-cookie" instead of "username".

cfalzone avatar Jun 23 '15 19:06 cfalzone

Added TC: http://qa.dotcms.com/index.php?/cases/view/61331

shaydotcms avatar Jul 02 '15 18:07 shaydotcms

PR: https://github.com/dotCMS/core/pull/7999

maurizo avatar Jul 23 '15 16:07 maurizo

QA: Please re-test #6823 #4840

jgambarios avatar Jul 27 '15 21:07 jgambarios

Fixed, tested on 3.3 // MySQL // FF

bryanboza avatar Aug 14 '15 21:08 bryanboza