Skip to content
Snippets Groups Projects
Commit 653e22f6 authored by Timo Schmidt's avatar Timo Schmidt Committed by Anja Leichsenring
Browse files

[BUGFIX] Installtool blocked when session file is empty

When the session information is fetched from the file system it can
happen that the session file is empty.

We should check for the file length and only read it, when the file
length is larger then 0.

Change-Id: I8857efc54f76c56984bc3486064b622b05e488b8
Resolves: #79955
Releases: master
Reviewed-on: https://review.typo3.org/51835


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 27793e35
Branches
Tags
No related merge requests found
......@@ -389,7 +389,10 @@ class SessionService implements \TYPO3\CMS\Core\SingletonInterface
if ($fd = fopen($sessionFile, 'rb')) {
$lockres = flock($fd, LOCK_SH);
if ($lockres) {
$content = fread($fd, filesize($sessionFile));
$length = filesize($sessionFile);
if ($length > 0) {
$content = fread($fd, $length);
}
flock($fd, LOCK_UN);
}
fclose($fd);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment