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:
Yasuo Ohgaki 2016-09-09 11:39:40 +09:00
commit 17dbb916fc
3 changed files with 10 additions and 2 deletions

4
NEWS
View file

@ -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)

View file

@ -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

View file

@ -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