[ 
https://issues.apache.org/jira/browse/WICKET-7089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17798458#comment-17798458
 ] 

ASF subversion and git services commented on WICKET-7089:
---------------------------------------------------------

Commit 17dc3f81ab8fb093a4eb7e7ecbf8f8ca6efb9a75 in wicket's branch 
refs/heads/master from Vit Rozkovec
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=17dc3f81ab ]

WICKET-7089: Fix setting SameSite cookie attribute on Servlet 5 (#749)

* WICKET-7089: Fix setting SameSite cookie attribute on Servlet 5

* WICKET-7089: Make CookieUtils#setAttribute() more usable for any custom 
attribute

Add unit tests

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

---------

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Co-authored-by: Martin Tzvetanov Grigorov <[email protected]>

> Set cookie SameSite only if the container supports it
> -----------------------------------------------------
>
>                 Key: WICKET-7089
>                 URL: https://issues.apache.org/jira/browse/WICKET-7089
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 10.0.0-M2
>            Reporter: Martin Tzvetanov Grigorov
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Major
>             Fix For: 10.0.0-M3
>
>
> [https://lists.apache.org/thread/nwnhygmwoodbmx8f5j0rtm5wgy21p5kr]
>  
> {code:java}
> Hi,
> in parent pom.xml you are referencing
> <jakarta.servlet-api.version>6.0.0</jakarta.servlet-api.version>
> but here you state that Servlet 5+ is required:
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+10.0#MigrationtoWicket10.0-Wicket10requiresServlet5+
> I've been bitten by this today when users couldn't sign in the app as 
> CookieUtils.initializeCookie uses 6.0.0 api, start of the stacktrace:
> java.lang.NoSuchMethodError: 'void 
> jakarta.servlet.http.Cookie.setAttribute(java.lang.String, 
> java.lang.String)'
>      at 
> org.apache.wicket.util.cookies.CookieUtils.initializeCookie(CookieUtils.java:341)
>      at 
> org.apache.wicket.util.cookies.CookieUtils.save(CookieUtils.java:294)
>      at 
> org.apache.wicket.util.cookies.CookieUtils.save(CookieUtils.java:168)
>      at 
> org.apache.wicket.authentication.strategy.DefaultAuthenticationStrategy.save(DefaultAuthenticationStrategy.java:148)
> Cookie.setAttribute is not present in 5.0.0 jservlet-api.
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to