Skip to content

Session cookie is actually persistant #12372

Open
@davidpede

Description

@davidpede

Summary

The system setting 'session_cookie_lifetime' is by default set to '604800' (one week) and the description indicates that it is only used if a user selects 'Remember Me' when logging in:

"Use this setting to customize the session cookie lifetime in seconds. This is used to set the lifetime of a client session cookie when they choose the 'remember me' option on login."

However the 'PHPSESSID' session cookie set by MODX for any anonymous user is acually set to expire using the 'session_cookie_lifetime' setting of one week. This interfers with things like a shopping cart that uses session variables as the user uses the same session/session variables for a week.

Leaving the 'session_cookie_lifetime' setting blank fixes this and the 'PHPSESSID' cookie expires on closing the browser, but you lose the 'Remember Me' function.

Is this a bug or expected behavior? If expected perhase the setting desc needs correcting?

Step to reproduce

Clear all browser cookies and visit a MODX website. Using firebug/dev tools inspect the 'PHPSESSID' cookie.

Observed behavior

'PHPSESSID' cookie is set to expire in one week.

Expected behavior

'PHPSESSID' cookie should be set to expire at end of session.

Environment

MODX Revolution 2.3.3-adv, Firefox, Chrome, IE11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-corearea-securitybugThe issue in the code or project, which should be addressed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions