Skip Menu |

This queue is for tickets about the libapreq2 CPAN distribution.

Report information
The Basics
Id: 130284
Status: open
Priority: 0/
Queue: libapreq2

People
Owner: Nobody in particular
Requestors: NEILB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.13
Fixed in: (no value)



Subject: Add support for SameSite
Cookies can now have SameSite attribute set: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#SameSite_cookies The interface could be: $cookie = Apache2::Cookie->new($r, -name => 'foo', -value => 'bar', -expires => '+3M', -domain => '.capricorn.com', -path => '/cgi-bin/database', -secure => 1 -samesite => "Strict" # or "Lax" ); $cookie->samesite("Strict");
There's an alternative to Apache2::Cookie which I have used. The package is CGI::Cookie (https://github.com/leejo/CGI.pm/blob/master/lib/CGI/Cookie.pm) which provides support for "SameSite" attribute, but the only problem with that was it only supports "Strict, Lax" options. I have forked the repo and added support for "SameSite=None" attribute as well. The PR can be found here (https://github.com/leejo/CGI.pm/pull/237) It would be helpful if contributors could review the above PR and provide feedback. I have tested the changes in my local environment.
The above PR for CGI::Cookie for adding support for SameSite = None has been accepted by the author. https://github.com/leejo/CGI.pm/pull/237 So as an alternative to Apache2::Cookie, you can now use CGI::Cookie
On Mon Jan 13 23:20:14 2020, durveshbhole9@gmail.com wrote: Show quoted text
> The above PR for CGI::Cookie for adding support for SameSite = None > has been accepted by the author. > https://github.com/leejo/CGI.pm/pull/237 > > So as an alternative to Apache2::Cookie, you can now use CGI::Cookie
Also find the updated release at: https://metacpan.org/pod/CGI::Cookie