Skip to content

Allow "Secure" cookie attribute via HTTP on localhost#2483

Merged
tvdijen merged 3 commits intosimplesamlphp:masterfrom
exeba:secure-cookie
Jul 10, 2025
Merged

Allow "Secure" cookie attribute via HTTP on localhost#2483
tvdijen merged 3 commits intosimplesamlphp:masterfrom
exeba:secure-cookie

Conversation

@exeba
Copy link
Copy Markdown
Contributor

@exeba exeba commented Jul 5, 2025

According to Mozilla Docs, Secure attribute should be allowed on localhost even if HTTP is used.

It makes testing a little easier.

My only doubt is about "localhost" vs "127.0.0.1" should both be allowed or only the former?

@tvdijen
Copy link
Copy Markdown
Member

tvdijen commented Jul 5, 2025

I'd say this includes 127.0.0.0/8 and ::1

@edit: Grok thinks this only applies to 127.0.0.1 and ::1 and not the entire loopback-ranges, so this PR is good!

@tvdijen tvdijen merged commit cbca853 into simplesamlphp:master Jul 10, 2025
13 of 19 checks passed
tvdijen added a commit that referenced this pull request Jul 10, 2025
* allow secure cookie on localhost

* allow ipv4 & ipv6 loopback addresses

* Remove excess parenthesis

---------

Co-authored-by: Sebastiano Degan <sebastiano@localhost.localdomain>
Co-authored-by: Tim van Dijen <tvdijen@gmail.com>
tvdijen added a commit that referenced this pull request Jul 10, 2025
* allow secure cookie on localhost

* allow ipv4 & ipv6 loopback addresses

* Remove excess parenthesis

---------

Co-authored-by: Sebastiano Degan <sebastiano@localhost.localdomain>
Co-authored-by: Tim van Dijen <tvdijen@gmail.com>
@tvdijen
Copy link
Copy Markdown
Member

tvdijen commented Jul 10, 2025

Backported into 2.4 and 2.3 release-branch. To be released in a next dot-release
Thanks @exeba

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants