[php-src] master: session: ensure expected INI directives are set (#22577)

Remi Collet via GitHub <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Remi Collet (remicollet)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-07-06T18:23:26+01:00

Commit: https://github.com/php/php-src/commit/5ab3b338ac8b6d921a0cc595d7db31853874a423
Raw diff: https://github.com/php/php-src/commit/5ab3b338ac8b6d921a0cc595d7db31853874a423.diff

session: ensure expected INI directives are set (#22577)

Changed paths:
  M  ext/session/tests/bug80774.phpt
  M  ext/session/tests/gh9200.phpt
  M  ext/session/tests/session_regenerate_id_cookie.phpt
  M  ext/session/tests/session_start_partitioned_headers.phpt


Diff:

diff --git a/ext/session/tests/bug80774.phpt b/ext/session/tests/bug80774.phpt
index ba5d39e1953a..1e98da74e9d6 100644
--- a/ext/session/tests/bug80774.phpt
+++ b/ext/session/tests/bug80774.phpt
@@ -4,6 +4,8 @@ Bug #80774 (session_name() problem with backslash)
 session
 --INI--
 session.use_strict_mode=0
+session.cookie_samesite=Lax
+session.cookie_httponly=1
 --FILE--
 <?php
 session_name("foo\\bar");
diff --git a/ext/session/tests/gh9200.phpt b/ext/session/tests/gh9200.phpt
index 7e458176d10f..cb97f2707a19 100644
--- a/ext/session/tests/gh9200.phpt
+++ b/ext/session/tests/gh9200.phpt
@@ -3,6 +3,8 @@ GH-9200: setcookie has an obsolete expires date format
 --INI--
 session.cookie_lifetime=3600
 session.use_strict_mode=0
+session.cookie_samesite=Lax
+session.cookie_httponly=1
 --EXTENSIONS--
 session
 --CGI--
diff --git a/ext/session/tests/session_regenerate_id_cookie.phpt b/ext/session/tests/session_regenerate_id_cookie.phpt
index 32706047539a..7147e36a774c 100644
--- a/ext/session/tests/session_regenerate_id_cookie.phpt
+++ b/ext/session/tests/session_regenerate_id_cookie.phpt
@@ -4,6 +4,8 @@ Test session_regenerate_id() function : basic functionality
 session
 --INI--
 session.sid_length = 32
+session.cookie_samesite=Lax
+session.cookie_httponly=1
 --SKIPIF--
 <?php
 
diff --git a/ext/session/tests/session_start_partitioned_headers.phpt b/ext/session/tests/session_start_partitioned_headers.phpt
index 4a2c7dcf878f..8afae811152e 100644
--- a/ext/session/tests/session_start_partitioned_headers.phpt
+++ b/ext/session/tests/session_start_partitioned_headers.phpt
@@ -4,6 +4,8 @@ session_start() with partitioned cookies - header test
 session
 --INI--
 session.use_strict_mode=0
+session.cookie_samesite=Lax
+session.cookie_httponly=1
 --FILE--
 <?php
 session_id('12345');
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.