[php-src] PR #25315: Fix GH-25307: NULL ps_files deref after SessionHandler::open() on user module
| From: | lazerg | Date: | Sun, 08 Nov 2026 14:12:39 +0000 |
| Subject: | [php-src] PR #25315: Fix GH-25307: NULL ps_files deref after SessionHandler::open() on user module | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40428@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25315
Author: lazerg
After session.save_handler is switched back from "user" to "files" with
ini_set(), PS(default_mod) points at the user module. SessionHandler::open() then calls the user
open handler, which sets PS(mod_user_implemented) even though files is the active module. Once the
files handler has closed the session, RSHUTDOWN still calls its close handler because of that flag,
and ps_files_close() gets NULL data. SessionHandler now throws "Cannot call default session
handler" when the default module is the user module, since it only wraps a non-user handler.
Fixes #25307