Project

General

Profile

Actions

Bug #82277

closed

New +s directory permissions lead to failing is_file() in template path resolution

Added by Gregor Favre over 6 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2017-09-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

When updating to 8.7.4 via install tool, the subdirectories in typo3_src-8.7.4 have these permission: "drwxr-sr-x". In older releases, the permissions were these: "drwxr-xr-x".

When working with directories with +s permissions, PHP function is_file() always returns false (see http://php.net/manual/de/function.is-file.php#107403). This could be an issue in several places in the core.

Example: I ran in the issue, that my partial root path was not recognized. After digging in, I found in /typo3_src/vendor/typo3fluid/fluid/src/View/TemplatePaths.php in resolveFileInPaths(), that the presence of template files is checked with is_file(). That means, that template resolution is not working anymore for example.

Possible workarounds:
- Changing the funtions from is_file() to file_exists() resolves the issue.
- Changing directory permissions from +s to +x also resolves the issue.

I suggest, changing back the permissions in the distributed tarballs back to +x if there was no explicit reason why to have it changed to +s in the future.

(Possibly regression, and category security)

Actions

Also available in: Atom PDF