diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-09-27 10:41:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-27 10:41:21 +0200 |
commit | 90d7e8f6f4efcdf158136683e554e1c94509beb2 (patch) | |
tree | 633b90166e0ca2ad6f292fe98f1529ba9311d9ab | |
parent | b87914be9c9452c0a05ecadf6b26001b7fdb5333 (diff) | |
parent | 2e19c42bc55b4f8e9228ba740ba95933dbff18ee (diff) | |
download | nextcloud-server-90d7e8f6f4efcdf158136683e554e1c94509beb2.tar.gz nextcloud-server-90d7e8f6f4efcdf158136683e554e1c94509beb2.zip |
Merge pull request #6586 from nextcloud/fix/app-install-extract-check
Check whether an app archive can be extracted
-rw-r--r-- | lib/private/Installer.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php index 4d7e5016653..d5082a7fad2 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -288,7 +288,14 @@ class Installer { $archive = new TAR($tempFile); if($archive) { - $archive->extract($extractDir); + if (!$archive->extract($extractDir)) { + throw new \Exception( + sprintf( + 'Could not extract app %s', + $appId + ) + ); + } $allFiles = scandir($extractDir); $folders = array_diff($allFiles, ['.', '..']); $folders = array_values($folders); |