Skip to content

SessionAutoConfiguration creates a DefaultCookieSerializer with a default SameSite of null instead of Lax #48830

@antechrestos

Description

@antechrestos

While upgrading to SB 4.1 I've spotted a strange behaviour (currently I have tests that tests the sameSite attribute on cookie serializer)

In springboot 4 the DefaultCookieSerializer is built with its sameSite attribute set to Lax.

Hwever, in SessionAutoConfiguration, we can see that PropertyMapper does not filter null values as it used to do and sets the sameSite attribute to the value read from properties, regardless to the fact that it might be null in properties.

In previous version, the property mapper used to be built with a setting of value non null.

I fear that it might change default behaviour for application not setting the server.servlet.session.cookie.same-site property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionA regression from a previous release

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions