aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-09-09 19:50:11 +0200
committerGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-09-11 11:12:59 +0200
commit8585b053574c0f9cc3d34c1b064688012e060b28 (patch)
treebdc3f0a71895722489fe26b61ee9f0e4e1382080
parent3a85997940470bb30ecfa33e4bf4a5d247207e9d (diff)
downloadnextcloud-server-8585b053574c0f9cc3d34c1b064688012e060b28.tar.gz
nextcloud-server-8585b053574c0f9cc3d34c1b064688012e060b28.zip
fix(appstore): Ensure returned apps from AppStore are valid
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: lint chore: remove space Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: check if response array is null Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> chore: Add log
-rw-r--r--lib/private/App/AppStore/Fetcher/AppFetcher.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php
index ae36d849c5e..d2c98c4afc9 100644
--- a/lib/private/App/AppStore/Fetcher/AppFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php
@@ -53,7 +53,8 @@ class AppFetcher extends Fetcher {
/** @var mixed[] $response */
$response = parent::fetch($ETag, $content);
- if (empty($response)) {
+ if (empty($response) || $response['data'] === null) {
+ $this->logger->warning('Response from appstore is invalid, apps could not be retrieved. Try again later.', ['app' => 'appstoreFetcher']);
return [];
}