jakartaee / servlet

Jakarta Servlet
https://eclipse.org/ee4j/servlet
Other
266 stars 87 forks source link

Add SameSite attribute to Cookie class #465

Closed Abderrahman-byte closed 2 years ago

markt-asf commented 2 years ago

Servlet 6.0 adds generic attribute support. We will no longer be adding support for specific attributes to this class.

Abderrahman-byte commented 2 years ago

Servlet 6.0 adds generic attribute support. We will no longer be adding support for specific attributes to this class.

Okey thank you I did not know that.

pizzi80 commented 10 months ago

I think this issue should be reopened and implemented in Servlet 6.1

The SameSite attribute it's too important to be declassed as a generic attribute, there are a lot of conseguences around not setting or setting the wrong value!

If I use the generic setAttribute method and make a typo, the webapp may no longer work properly!

For real world developers it's really important to have a set-in-stone fundamental attribute like this one

https://web.dev/articles/samesite-cookie-recipes?hl=en https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#creating_cookies