summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-10 16:16:05 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-10 16:16:05 +0200
commit6e4a79f8529a69b846f73257cc581d2b80f7762d (patch)
tree6224bc4efeaf615c029ff396798d0f60f5372442
parent15e16d335db5771778477e944d4e63ac807382b9 (diff)
parentc7c021e1c98f553668511dd9af79e4ad4eda6801 (diff)
downloadnextcloud-server-6e4a79f8529a69b846f73257cc581d2b80f7762d.tar.gz
nextcloud-server-6e4a79f8529a69b846f73257cc581d2b80f7762d.zip
Merge pull request #18159 from owncloud/check-appid-folder-in-archive
Check if archive contains a directory named like appid
-rw-r--r--lib/private/installer.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 37af8d0edcb..392dc1c0817 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -107,6 +107,10 @@ class OC_Installer{
}
$extractDir .= '/' . $info['id'];
+ if(!file_exists($extractDir)) {
+ OC_Helper::rmdirr($basedir);
+ throw new \Exception($l->t("Archive does not contain a directory named %s", $info['id']));
+ }
OC_Helper::copyr($extractDir, $basedir);
//remove temporary files