[BUGFIX] Do not use realpath for temporary file names 90/50490/6
authorStefan Froemken <froemken@gmail.com>
Thu, 3 Nov 2016 10:44:51 +0000 (11:44 +0100)
committerHelmut Hummel <typo3@helhum.io>
Sat, 31 Dec 2016 09:15:55 +0000 (10:15 +0100)
commitfe23a0b0029f6fe0d95f8a04e80f98df2f3ee65c
tree9179b78d474ae9aeffe283d5674ee10a2d0c42c7
parent3d107451c9d0b7631c889896d010d9ca93934eac
[BUGFIX] Do not use realpath for temporary file names

Generating a temporary file with the PHP function tempnam,
returns the realpath of the file. There are however
situations where PATH_site has some symlinks or mounts, thus
comparing those paths will fail.

Instead of just using the path the function returns, we only
use the filename and prefix that with PATH_site, so that
the check if the temporary path is within PATH_site will succeed.

Resolves: #70106
Releases: master, 7.6, 6.2
Change-Id: I39a1830ff1a5791aa3fdc91056e3870fbb6dde1f
Reviewed-on: https://review.typo3.org/50490
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Alexander Krist <mail@alex-krist.de>
Tested-by: Alexander Krist <mail@alex-krist.de>
Reviewed-by: Daniela Grammlich <grammlich@punkt.de>
Tested-by: Daniela Grammlich <grammlich@punkt.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Alexander Stehlik <alexander.stehlik@gmail.com>
Tested-by: Alexander Stehlik <alexander.stehlik@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
typo3/sysext/core/Classes/Utility/GeneralUtility.php