Opened 4 years ago
Closed 2 years ago
#55440 closed enhancement (duplicate)
Introduce a wrapper fro setcookie()
| Reported by: | Chouby | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Recent browsers expect the parameter samesite to be set. A new parameter sameparty is on its way too.
The old (PHP < 7.3) setcookie() signature doesn't accept these new parameters. It's however possible to set them with a hack.
I propose to introduce a new wp_set_cookie() function to support all versions of PHP. I also propose to introduce a filter in this function. This should help for #37000.
Attachments (1)
Change History (4)
This ticket was mentioned in Slack in #core by sebastienserre. View the logs.
2 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The first patch is proposed for feedback on the function itself. It doesn't include the replacement of the current calls to
setcookie()bywp_set_cookie().