File tree 2 files changed +23
-2
lines changed
2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,17 @@ PHP_METHOD(SessionHandler, open)
47
47
48
48
PS_SANITY_CHECK ;
49
49
50
- PS (mod_user_is_open ) = 1 ;
51
-
52
50
zend_try {
53
51
ret = PS (default_mod )-> s_open (& PS (mod_data ), save_path , session_name );
54
52
} zend_catch {
55
53
PS (session_status ) = php_session_none ;
56
54
zend_bailout ();
57
55
} zend_end_try ();
58
56
57
+ if (SUCCESS == ret ) {
58
+ PS (mod_user_is_open ) = 1 ;
59
+ }
60
+
59
61
RETURN_BOOL (SUCCESS == ret );
60
62
}
61
63
/* }}} */
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-13856 (Member access within null pointer of type 'ps_files' in ext/session/mod_files.c)
3
+ --EXTENSIONS--
4
+ session
5
+ --INI--
6
+ session.save_handler=files
7
+ open_basedir=.
8
+ error_reporting=E_ALL
9
+ --FILE--
10
+ <?php
11
+ session_set_save_handler (new \SessionHandler (), true );
12
+ session_start ();
13
+ ?>
14
+ --EXPECTF--
15
+ Warning: SessionHandler::open(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d
16
+
17
+ Warning: SessionHandler::close(): Parent session handler is not open in %s on line %d
18
+
19
+ Warning: session_start(): Failed to initialize storage module: user (path: ) in %s on line %d
You can’t perform that action at this time.
0 commit comments