Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2599,9 +2599,6 @@
<code><![CDATA[$matches[0][$last_match]]]></code>
<code><![CDATA[$matches[1][$last_match]]]></code>
</InvalidArrayOffset>
<InvalidScalarArgument>
<code><![CDATA[$path]]></code>
</InvalidScalarArgument>
<UndefinedInterfaceMethod>
<code><![CDATA[getQuota]]></code>
</UndefinedInterfaceMethod>
Expand Down
9 changes: 8 additions & 1 deletion lib/private/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ public function downloadApp(string $appId, bool $allowUnstable = false): void {

// Download the release
$tempFile = $this->tempManager->getTemporaryFile('.tar.gz');
if ($tempFile === false) {
throw new \RuntimeException('Could not create temporary file for downloading app archive.');
}

$timeout = $this->isCLI ? 0 : 120;
$client = $this->clientService->newClient();
$client->get($app['releases'][0]['download'], ['sink' => $tempFile, 'timeout' => $timeout]);
Expand All @@ -252,8 +256,11 @@ public function downloadApp(string $appId, bool $allowUnstable = false): void {
if ($verified === true) {
// Seems to match, let's proceed
$extractDir = $this->tempManager->getTemporaryFolder();
$archive = new TAR($tempFile);
if ($extractDir === false) {
throw new \RuntimeException('Could not create temporary directory for unpacking app.');
}

$archive = new TAR($tempFile);
if (!$archive->extract($extractDir)) {
$errorMessage = 'Could not extract app ' . $appId;

Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public static function canExecute($name, $path = false) {
$exts = [''];
$check_fn = 'is_executable';
// Default check will be done with $path directories :
$dirs = explode(PATH_SEPARATOR, $path);
$dirs = explode(PATH_SEPARATOR, (string)$path);
// WARNING : We have to check if open_basedir is enabled :
$obd = OC::$server->get(IniGetWrapper::class)->getString('open_basedir');
if ($obd != 'none') {
Expand Down
Loading