Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit fe912ca

Browse files
committed
Menu "Download" with PowerFS failed if accent in parent folder
1 parent b8bddd7 commit fe912ca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/plugins/action.powerfs/class.PowerFSController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function switchAction($action, $httpVars, $fileVars)
9999

100100
case "postcompress_download":
101101

102-
$archive = AJXP_Utils::getAjxpTmpDir().DIRECTORY_SEPARATOR.$httpVars["ope_id"]."_".$httpVars["archive_name"];
102+
$archive = AJXP_Utils::getAjxpTmpDir().DIRECTORY_SEPARATOR.$httpVars["ope_id"]."_".AJXP_Utils::sanitize(AJXP_Utils::decodeSecureMagic($httpVars["archive_name"]), AJXP_SANITIZE_FILENAME);
103103
$fsDriver = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("access");
104104
if (is_file($archive)) {
105105
register_shutdown_function("unlink", $archive);
@@ -161,7 +161,6 @@ public function switchAction($action, $httpVars, $fileVars)
161161
}
162162
}
163163
$cmdSeparator = ((PHP_OS == "WIN32" || PHP_OS == "WINNT" || PHP_OS == "Windows")? "&" : ";");
164-
//$archiveName = SystemTextEncoding::fromUTF8($httpVars["archive_name"]);
165164
if (!$compressLocally) {
166165
$archiveName = AJXP_Utils::getAjxpTmpDir().DIRECTORY_SEPARATOR.$httpVars["ope_id"]."_".$archiveName;
167166
}

0 commit comments

Comments
 (0)