|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2021-02-19 11:13 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2021-02-19 11:13 UTC] cmb@php.net
[2021-02-19 12:25 UTC] cmb@php.net
[2021-02-22 11:38 UTC] cmb@php.net
[2021-02-22 11:38 UTC] cmb@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
Description: ------------ We have a trait for handling sessions, which includes (abbreviated): trait SessionOpenCloseTrait { protected function open_session($name) { session_name($name); session_start(); } } Other classes invoke this using __CLASS__ as the $name parameter: class SecureToken { use SessionOpenCloseTrait; public function __construct() { $this->open_session(__CLASS__); } } When namespaced, __CLASS__ contains a backslash (e.g. "Parent\SecureToken"). This has not been a problem until a security upgrade took us from 7.3.19 to 7.3.27. After the upgrade the SESSION was being written to the server as normal, but no longer accessible on subsequent requests. *Possibly* due to encoding of the cookie name. To fix this, we had to remove the '\': protected function open_session($name) { + $name = str_replace("\\", "", $name); session_name($name); session_start(); }