Navigation Menu

Skip to content

Commit

Permalink
[BUGFIX] Ensure ZipService sets proper permissions recursively
Browse files Browse the repository at this point in the history
ZipService->extract was introduced for a security patch set
but the permissions are not set correctly, as fixPermissions
receives a directory with a slash at the end, resulting
in "//" for recursive checks.

This patch fixes the issue.

Resolves: #90417
Relates: #90118
Releases: master, 9.5
Change-Id: Ie56ef6a3781b12c9ac2cf9a859ec226f48691d7f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64267
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Danilo Caccialanza <supercaccia@bluewin.ch>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Danilo Caccialanza <supercaccia@bluewin.ch>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
  • Loading branch information
bmack authored and andreaskienast committed Apr 21, 2020
1 parent a7cb879 commit 47525f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/Service/Archive/ZipService.php
Expand Up @@ -51,7 +51,7 @@ public function extract(string $fileName, string $directory): bool
$result = $zip->extractTo($directory);
$zip->close();
if ($result) {
GeneralUtility::fixPermissions($directory, true);
GeneralUtility::fixPermissions(rtrim($directory, '/'), true);
}
return $result;
}
Expand Down

0 comments on commit 47525f4

Please sign in to comment.