Bug #74255 [NEW]: session.use_strict_mode doesn't work with session_set_save_handler upon 'files'
From: greedy dot ivan at gmail dot com
Operating system: Windows
PHP version: 7.1.2
Package: Session related
Bug Type: Bug
Bug description:session.use_strict_mode doesn't work with session_set_save_handler upon
'files'
Description:
------------
When session.use_strict_mode is on and custom session handler is wrapped
upon 'files' internal handler, session id doesn't regenerate if session
id doesn't exist.
If you delete session file and rerun, script must create file with new
session id.
It works without session_set_save_handler as expected.
Where session_set_save_handler is set, session id doesn't regenerate.
So, you cannot simply extend internal handler with crypt/decrypt (or
something else), because you must redefine open method and all internal
logic of finding session file.
Test script:
---------------
session_module_name('files');
ini_set('session.use_strict_mode', '1');
class MySessionHandler extends SessionHandler{}
session_set_save_handler(new MySessionHandler(), true);
session_start();
var_dump(session_id());
Expected result:
----------------
if you delete session file, next run show you another session_id
Actual result:
--------------
You always give the same session id
--
Edit bug report at https://bugs.php.net/bug.php?id=74255&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74255&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74255&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74255&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74255&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74255&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74255&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74255&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74255&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74255&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74255&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74255&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74255&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74255&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74255&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74255&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74255&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74255&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74255&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74255&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74255&r=mysqlcfg
Thread (5 messages)
- greedy dot ivan at gmail dot com