mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Update NEWS Fixed Bug #68015 Session does not report invalid uid for files save handler
This commit is contained in:
commit
17dbb916fc
3 changed files with 10 additions and 2 deletions
4
NEWS
4
NEWS
|
@ -23,6 +23,10 @@ PHP NEWS
|
|||
. Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp()
|
||||
function). (Laruence)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #68015 (Session does not report invalid uid for files save handler).
|
||||
(Yasuo)
|
||||
|
||||
- SQLite3:
|
||||
. Updated to SQLite3 3.14.1. (cmb)
|
||||
|
||||
|
|
|
@ -175,6 +175,7 @@ static void ps_files_open(ps_files *data, const char *key)
|
|||
}
|
||||
|
||||
if (!ps_files_path_create(buf, sizeof(buf), data, key)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to create session data file path. Too short session ID, invalid save_path or path lentgth exceeds MAXPATHLEN(%d)", MAXPATHLEN);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -199,6 +200,7 @@ static void ps_files_open(ps_files *data, const char *key)
|
|||
if (fstat(data->fd, &sbuf) || (sbuf.st_uid != 0 && sbuf.st_uid != getuid() && sbuf.st_uid != geteuid())) {
|
||||
close(data->fd);
|
||||
data->fd = -1;
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Session data file is not created by your uid");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -22,5 +22,7 @@ session_write_close();
|
|||
print "I live\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: session_start(): Failed to read session data: files (path: 123;:/really%scompletely:::/invalid;;,23123;213) in %s on line %d
|
||||
I live
|
||||
Warning: session_start(): Failed to create session data file path. Too short session ID, invalid save_path or path lentgth exceeds MAXPATHLEN(%d) in %s on line 4
|
||||
|
||||
Warning: session_start(): Failed to read session data: files (path: 123;:/really\completely:::/invalid;;,23123;213) in %s on line 4
|
||||
I live
|
Loading…
Add table
Add a link
Reference in a new issue