mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue