Bug #59303
closedRetrieving resources with relative links is messy
100%
Description
Hi
The use case is the following:
1) TYPO3 6.2.x installed with symlinks
ls -lah:
... index.php -> typo3_src/index.php
... typo3 -> typo3_src/typo3
... typo3_src -> typo3_src-6.2.3
... typo3_src-6.2.3
2) t3skin installed locally to fix some issues with templavoila
If I open the about module, I get an exception: "#1314516810: File /typo3conf/ext/t3skin/icons/gfx/typo3logo.gif/ does not exist."
The reason behind this is, that the about module tries to get the typo3logo.gif and tries to find it in typo3/, which is resolved to "../typo3/../typo3conf/ext/t3skin/icons/gfx/typo3logo.gif" by \TYPO3\CMS\Backend\Utility\IconUtility::skinImg().
=> This path would be correct, if not for the symlink structure
=> Because of the symlink this path now points (on the system level) at "typo3_src-6.2.3/typo3/../typo3conf/ext/t3skin/icons/gfx/typo3logo.gif" or "typo3_src-6.2.3/typo3conf/ext/t3skin/icons/gfx/typo3logo.gif" which does not exist
In \TYPO3\CMS\Core\Resource\ResourceFactory on line 462
} elseif (@is_file(PATH_site . $input)) {
does not find the file and defaults to creating a folder, which does not exist aswell.
In order to fix this globally, the ResourceFactory should manually resolve any "/./" or "/../". Otherwise this issue will arise in other locally installed system extensions. Also I can think of some scenarios, where this could potentially be a security issue (e.g. if the TYPO3 source is installed in an external folder on the same level with sensitive data).
Patch will be attached.
Cheers Nils
Files
Updated by Nils Blattner over 10 years ago
- File bug_59303.diff bug_59303.diff added
Updated by Markus Klein over 10 years ago
- Project changed from TYPO3 Core to 1716
- Category deleted (
File Abstraction Layer (FAL))
Updated by Markus Klein over 10 years ago
Moved to security area until it is verified this is not a security issue.
Updated by Helmut Hummel over 10 years ago
- Project changed from 1716 to TYPO3 Core
I do not see how sensitive data or files can be exposed by this, so this can be handled in our regular bug fixing procedure
Updated by Helmut Hummel over 10 years ago
Helmut Hummel wrote:
I do not see how sensitive data or files can be exposed by this, so this can be handled in our regular bug fixing procedure
To be clear: it is not possible to break out of a storage (not even storage 0) when accessing files. so no security issue here, "only" a bug
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30532
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30532
Updated by Nils Blattner over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f432417ef5481ac4a9e08d80e0a2463633092518.