Skip to content

Cookie mage-messages does not respect cookie configuration settings #34863

Open
@PromInc

Description

@PromInc

Preconditions (*)

  1. version 2.4.3

Steps to reproduce (*)

  1. Load any page of the website
  2. View the mage-messages cookie in the browsers developer tools Application panel and observe the Expires, Path, and Domain and compare to the admin configuration

Expected result (*)

  1. The configuration would match

Actual result (*)

  1. The configuration does not match

Notes about this issue

The configuration values for lifetime and path are not respected.

The configuration values for domain are not used when setting the mage-messages cookie.

Effects of this bug

Configure the cookie domain to not have a subdomain (ie. .example.com) but load the site with a subdomain (ie. www.example.com). Because the cookie doesn't respect the configuration for domain the browser sets the cookie with the subdomain (ie. www.example.com). If the site uses a secondary subdomain (ie. blog.example.com) the cookie will not persist as it was set only for www.example.com.

Configuration

Configuration Path: Stores -> Configuration -> General -> Web -> Default Cookie Settings:

Scope: Default Config

  • Cookie Lifetime: 3600
  • Cookie Path: empty
  • Cookie Domain: empty
  • Use HTTP Only: Yes
  • Cookie Restriction Mode: No

Scope: Main Website

  • Cookie Lifetime: 604800
  • Cookie Path: empty
  • Cookie Domain: .example.com
  • Use HTTP Only: Yes
  • Cookie Restriction Mode: No

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions