#101350open_basedir restriction in effect
Description
TYPO3 11.5.29
Core: Error handler (BE): PHP Warning: file_exists(): open_basedir restriction in effect. File(/typo3conf/ext/my_ext/Resources/Public/Css/facility-backend.css) is not within the allowed path(s)
this is imho an absolute path and so the error message is flooding the error log.
The css file is included by the asset viewhelper (i think with the right notation):
<f:asset.css identifier="backendfacility" href="EXT:bbb_facility/Resources/Public/Css/facility-backend.css" />
And this generates an absolut path, interesting because the general utility say some different here:
GeneralUtility.php line 2318:
$fileExists = file_exists($path);
And the $path variable comes from here: GeneralUtility.php line 2298:
if ($isFrontend) {
// Frontend should still allow /static/myfile.css - see #98106
// This should happen regardless of the incoming path is absolute or not
$path = self::resolveBackPath(self::dirname(Environment::getCurrentScript()) . '/' . $path);
} elseif (!PathUtility::isAbsolutePath($path)) {
// Backend and non-absolute path
$path = self::resolveBackPath(self::dirname(Environment::getCurrentScript()) . '/' . $path);
}
So the comment say: “Backend and non-absolute path” but the resulting path is an absolute path?
And what is this condition realy about, both cases makes the same, i can not see any different?
Reviews 3
Related issues 5
- Bug #98330PHP warning log with EXT-syntax using asset vh in BE
- Bug #100021Incorrect path because of absolutely reference file(s) in typo3/cms-dashboard plus it causes open_basedir warnings
- Bug #101921open_basedir restriction in effect. File(/typo3/sysext/form/Resources/Public/Css/form.css) is not within the allowed
- Bug #102736Install Tool Configuration Presets broken for image handling settings with debug mode enabled
- Bug #105424Open Basdir SVG Icons