aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Authentication/Token/DefaultTokenProvider.php2
-rw-r--r--lib/private/legacy/OC_App.php16
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php
index a5fabdbeae2..a60c8b85b08 100644
--- a/lib/private/Authentication/Token/DefaultTokenProvider.php
+++ b/lib/private/Authentication/Token/DefaultTokenProvider.php
@@ -224,7 +224,7 @@ class DefaultTokenProvider implements IProvider {
*/
public function getPassword(IToken $savedToken, string $tokenId): string {
$password = $savedToken->getPassword();
- if (is_null($password)) {
+ if ($password === null || $password === '') {
throw new PasswordlessTokenException();
}
return $this->decryptPassword($password, $tokenId);
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 811703570a2..101523fcfe7 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -774,6 +774,18 @@ class OC_App {
}
/**
+ * List all supported apps
+ *
+ * @return array
+ */
+ public function getSupportedApps(): array {
+ /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */
+ $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class);
+ $supportedApps = $subscriptionRegistry->delegateGetSupportedApps();
+ return $supportedApps;
+ }
+
+ /**
* List all apps, this is used in apps.php
*
* @return array
@@ -787,9 +799,7 @@ class OC_App {
$appList = [];
$langCode = \OC::$server->getL10N('core')->getLanguageCode();
$urlGenerator = \OC::$server->getURLGenerator();
- /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */
- $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class);
- $supportedApps = $subscriptionRegistry->delegateGetSupportedApps();
+ $supportedApps = $this->getSupportedApps();
foreach ($installedApps as $app) {
if (array_search($app, $blacklist) === false) {