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

Commit 3e18f98

Browse files
committed
Raise filtering level when downloading from remote or extarcting archive.
1 parent 6389be6 commit 3e18f98

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

core/src/plugins/access.fs/class.fsAccessDriver.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,6 @@ public function extractArchiveItemPreCallback($status, $data){
15971597
$realBase = AJXP_MetaStreamWrapper::getRealFSReference($this->urlBase);
15981598
$realBase = str_replace("\\", "/", $realBase);
15991599
$repoName = $this->urlBase.str_replace($realBase, "", $fullname);
1600-
16011600
$toNode = new AJXP_Node($repoName);
16021601
$toNode->setLeaf($data['folder'] ? false:true);
16031602
if(file_exists($toNode->getUrl())){
@@ -1612,6 +1611,12 @@ public function extractArchiveItemPostCallback($status, $data){
16121611
$fullname = $data['filename'];
16131612
$realBase = AJXP_MetaStreamWrapper::getRealFSReference($this->urlBase);
16141613
$repoName = str_replace($realBase, "", $fullname);
1614+
try{
1615+
$this->filterUserSelectionToHidden([$repoName]);
1616+
}catch(Exception $e){
1617+
@unlink($this->urlBase.$repoName);
1618+
return 1;
1619+
}
16151620
$toNode = new AJXP_Node($this->urlBase.$repoName);
16161621
$toNode->setLeaf($data['folder'] ? false:true);
16171622
AJXP_Controller::applyHook("node.change", array(null, $toNode, false));

core/src/plugins/uploader.http/class.HttpDownloader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public function switchAction($action, $httpVars, $fileVars)
5656
}else{
5757
throw new Exception("Missing argument, either file or dlfile");
5858
}
59+
$fsDriver = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("access");
60+
$fsDriver->filterUserSelectionToHidden(array($basename));
5961

6062
switch ($action) {
6163
case "external_download":

0 commit comments

Comments
 (0)