Commit 2dddd29b authored by Oliver Hader's avatar Oliver Hader Committed by Andreas Fernandez
Browse files

[BUGFIX] Avoid realpath resolving in PharStreamWrapperInterceptor

Given that e.g. public/typo3conf/ext/my_extension is symlinked to
packages/my_extension, PharStreamWrapper denies invocation since
realpath is resolved.

For the specific PharStreamWrapperInterceptor it is okay to avoid
realpath resolving.

Resolves: #88340
Releases: master, 9.5, 8.7
Change-Id: I46b7100547dd0e40d1d4d76a71047ef977d8ce63
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60739

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Mathias Brodala's avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: Thomas Löffler's avatartomalo.stuttgart <loeffler@spooner-web.de>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Mathias Brodala's avatarMathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Thomas Löffler's avatartomalo.stuttgart <loeffler@spooner-web.de>
Reviewed-by: default avatarRudy Gnodde <rgn@windinternet.nl>
Reviewed-by: default avatarKevin Meckl <kevin.meckl@zdrei.com>
Reviewed-by: Richard Haeser's avatarRichard Haeser <richard@maxserv.com>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent ccaa33a2
......@@ -20,6 +20,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\PharStreamWrapper\Assertable;
use TYPO3\PharStreamWrapper\Exception;
use TYPO3\PharStreamWrapper\Manager;
use TYPO3\PharStreamWrapper\Resolver\PharInvocationResolver;
class PharStreamWrapperInterceptor implements Assertable
{
......@@ -49,7 +50,7 @@ class PharStreamWrapperInterceptor implements Assertable
*/
protected function isAllowed(string $path): bool
{
$invocation = Manager::instance()->resolve($path);
$invocation = Manager::instance()->resolve($path, PharInvocationResolver::RESOLVE_ALIAS);
if ($invocation === null) {
return false;
}
......
Supports Markdown
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