Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Firewall ContextListener Ignores #Ignore Attribute During Serialization #59094

Copy link
Copy link
Closed as not planned
@tugrul

Description

@tugrul
Issue body actions

Symfony version(s) affected

6.4.15

Description

The ContextListener in Symfony uses the native PHP serializer, which does not respect the #Ignore attribute on user object fields. This results in the entire user object, including sensitive fields, being serialized into the session.

How to reproduce

Just put a breakpoint at line 172 and see $token variable on inspector.

https://github.com/symfony/security-http/blob/7.2/Firewall/ContextListener.php#L172

Possible Solution

The session storage should respect the #Ignore attribute to avoid serializing unnecessary or sensitive fields.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.