Skip to content

Commit

Permalink
[BUGFIX] Avoid realpath resolving in PharStreamWrapperInterceptor
Browse files Browse the repository at this point in the history
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/+/60756
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
  • Loading branch information
ohader authored and andreaskienast committed May 15, 2019
1 parent 05a9b26 commit 58c40c1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use TYPO3\PharStreamWrapper\Assertable;
use TYPO3\PharStreamWrapper\Exception;
use TYPO3\PharStreamWrapper\Manager;
use TYPO3\PharStreamWrapper\Resolver\PharInvocationResolver;

class PharStreamWrapperInterceptor implements Assertable
{
Expand Down Expand Up @@ -48,7 +49,7 @@ public function assert(string $path, string $command): bool
*/
protected function isAllowed(string $path): bool
{
$invocation = Manager::instance()->resolve($path);
$invocation = Manager::instance()->resolve($path, PharInvocationResolver::RESOLVE_ALIAS);
if ($invocation === null) {
return false;
}
Expand Down

0 comments on commit 58c40c1

Please sign in to comment.