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

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