Fixed Error when open_basedir is configured and the parent of tempDataPath is not included

Kirby

Well-known member
Affected version
2.2.11
Code:
RuntimeException: SplFileInfo::isFile(): open_basedir restriction in effect. File(/<tempdir>/..) is not within the allowed path(s)

#0 src/XF/Util/File.php(146): SplFileInfo->isFile()

Changing
PHP:
if (!$file->isFile() || $file->getFilename() == 'index.html')

to
PHP:
if ($file->isDot() || !$file->isFile() || $file->getFilename() === 'index.html')

seems to fix this.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.14).

Change log:
Skip relative (dot) files when cleaning up temporary files
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom