From 17a26dfcc1f4d02b54e6cbb500f41bbe25609f1e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 7 Feb 2018 16:03:21 +0100 Subject: [PATCH 1/3] Validate the info.xml against the appstore schema file Signed-off-by: Joas Schilling --- core/Command/App/CheckCode.php | 54 +- core/register_command.php | 3 +- lib/private/App/AppManager.php | 5 + lib/private/App/CodeChecker/InfoChecker.php | 155 ++-- resources/app-info-shipped.xsd | 671 ++++++++++++++++++ resources/app-info.xsd | 652 +++++++++++++++++ .../appinfo/info.xml | 9 - tests/apps/testapp-infoxml/appinfo/info.xml | 12 - .../testapp-name-missing/appinfo/info.xml | 11 - tests/apps/testapp-version/appinfo/info.xml | 11 - tests/apps/testapp-version/appinfo/version | 1 - .../appinfo/info.xml | 13 + tests/apps/testapp_infoxml/appinfo/info.xml | 16 + .../testapp_name_missing/appinfo/info.xml | 15 + tests/apps/testapp_version/appinfo/info.xml | 15 + tests/lib/App/CodeChecker/InfoCheckerTest.php | 19 +- 16 files changed, 1464 insertions(+), 198 deletions(-) create mode 100644 resources/app-info-shipped.xsd create mode 100644 resources/app-info.xsd delete mode 100644 tests/apps/testapp-dependency-missing/appinfo/info.xml delete mode 100644 tests/apps/testapp-infoxml/appinfo/info.xml delete mode 100644 tests/apps/testapp-name-missing/appinfo/info.xml delete mode 100644 tests/apps/testapp-version/appinfo/info.xml delete mode 100644 tests/apps/testapp-version/appinfo/version create mode 100644 tests/apps/testapp_dependency_missing/appinfo/info.xml create mode 100644 tests/apps/testapp_infoxml/appinfo/info.xml create mode 100644 tests/apps/testapp_name_missing/appinfo/info.xml create mode 100644 tests/apps/testapp_version/appinfo/info.xml diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php index 82a137e58e1..a129bcf1e10 100644 --- a/core/Command/App/CheckCode.php +++ b/core/Command/App/CheckCode.php @@ -44,20 +44,12 @@ use OC\App\CodeChecker\PrivateCheck; class CheckCode extends Command implements CompletionAwareInterface { - /** @var InfoParser */ - private $infoParser; - protected $checkers = [ 'private' => PrivateCheck::class, 'deprecation' => DeprecationCheck::class, 'strong-comparison' => StrongComparisonCheck::class, ]; - public function __construct(InfoParser $infoParser) { - parent::__construct(); - $this->infoParser = $infoParser; - } - protected function configure() { $this ->setName('app:check-code') @@ -134,50 +126,12 @@ class CheckCode extends Command implements CompletionAwareInterface { } if(!$input->getOption('skip-validate-info')) { - $infoChecker = new InfoChecker($this->infoParser); - - $infoChecker->listen('InfoChecker', 'mandatoryFieldMissing', function($key) use ($output) { - $output->writeln("Mandatory field missing: $key"); + // Can not inject because of circular dependency + $infoChecker = new InfoChecker(\OC::$server->getAppManager()); + $infoChecker->listen('InfoChecker', 'parseError', function($error) use ($output) { + $output->writeln("Invalid appinfo.xml file found: $error"); }); - $infoChecker->listen('InfoChecker', 'deprecatedFieldFound', function($key, $value) use ($output) { - if($value === [] || is_null($value) || $value === '') { - $output->writeln("Deprecated field available: $key"); - } else { - $output->writeln("Deprecated field available: $key => $value"); - } - }); - - $infoChecker->listen('InfoChecker', 'missingRequirement', function($minMax) use ($output) { - $output->writeln("Nextcloud $minMax version requirement missing"); - }); - - $infoChecker->listen('InfoChecker', 'differentVersions', function($versionFile, $infoXML) use ($output) { - $output->writeln("Different versions provided (appinfo/version: $versionFile - appinfo/info.xml: $infoXML)"); - }); - - $infoChecker->listen('InfoChecker', 'sameVersions', function($path) use ($output) { - $output->writeln("Version file isn't needed anymore and can be safely removed ($path)"); - }); - - $infoChecker->listen('InfoChecker', 'migrateVersion', function($version) use ($output) { - $output->writeln("Migrate the app version to appinfo/info.xml (add $version to appinfo/info.xml and remove appinfo/version)"); - }); - - if(OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $infoChecker->listen('InfoChecker', 'mandatoryFieldFound', function($key, $value) use ($output) { - $output->writeln("Mandatory field available: $key => $value"); - }); - - $infoChecker->listen('InfoChecker', 'optionalFieldFound', function($key, $value) use ($output) { - $output->writeln("Optional field available: $key => $value"); - }); - - $infoChecker->listen('InfoChecker', 'unusedFieldFound', function($key, $value) use ($output) { - $output->writeln("Unused field available: $key => $value"); - }); - } - $infoErrors = $infoChecker->analyse($appId); $errors = array_merge($errors, $infoErrors); diff --git a/core/register_command.php b/core/register_command.php index 372d775dc14..578b4f799b6 100644 --- a/core/register_command.php +++ b/core/register_command.php @@ -40,8 +40,7 @@ $application->add(new \Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand()); $application->add(new OC\Core\Command\Status); $application->add(new OC\Core\Command\Check(\OC::$server->getSystemConfig())); -$infoParser = new \OC\App\InfoParser(); -$application->add(new OC\Core\Command\App\CheckCode($infoParser)); +$application->add(new OC\Core\Command\App\CheckCode()); $application->add(new OC\Core\Command\L10n\CreateJs()); $application->add(new \OC\Core\Command\Integrity\SignApp( \OC::$server->getIntegrityCodeChecker(), diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 0e921ba1b7f..81037b42613 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -411,6 +411,7 @@ class AppManager implements IAppManager { /** * @inheritdoc + * In case you change this method, also change \OC\App\CodeChecker\InfoChecker::isShipped() */ public function isShipped($appId) { $this->loadShippedJson(); @@ -422,6 +423,10 @@ class AppManager implements IAppManager { return in_array($appId, $alwaysEnabled, true); } + /** + * In case you change this method, also change \OC\App\CodeChecker\InfoChecker::loadShippedJson() + * @throws \Exception + */ private function loadShippedJson() { if ($this->shippedApps === null) { $shippedJson = \OC::$SERVERROOT . '/core/shipped.json'; diff --git a/lib/private/App/CodeChecker/InfoChecker.php b/lib/private/App/CodeChecker/InfoChecker.php index e8791bd7037..f5de6d376d8 100644 --- a/lib/private/App/CodeChecker/InfoChecker.php +++ b/lib/private/App/CodeChecker/InfoChecker.php @@ -23,121 +23,88 @@ namespace OC\App\CodeChecker; -use OC\App\InfoParser; use OC\Hooks\BasicEmitter; +use OCP\App\AppPathNotFoundException; +use OCP\App\IAppManager; class InfoChecker extends BasicEmitter { - /** @var InfoParser */ - private $infoParser; + /** @var string[] */ + private $shippedApps; - private $mandatoryFields = [ - 'author', - 'description', - 'dependencies', - 'id', - 'licence', - 'name', - 'version', - ]; - private $optionalFields = [ - 'bugs', - 'category', - 'default_enable', - 'documentation', - 'namespace', - 'ocsid', - 'public', - 'remote', - 'repository', - 'types', - 'website', - ]; - private $deprecatedFields = [ - 'info', - 'require', - 'requiremax', - 'requiremin', - 'shipped', - 'standalone', - ]; - - public function __construct(InfoParser $infoParser) { - $this->infoParser = $infoParser; - } + /** @var string[] */ + private $alwaysEnabled; /** * @param string $appId * @return array + * @throws \RuntimeException */ - public function analyse($appId) { + public function analyse($appId): array { $appPath = \OC_App::getAppPath($appId); if ($appPath === false) { throw new \RuntimeException("No app with given id <$appId> known."); } + $xml = new \DOMDocument(); + $xml->load($appPath . '/appinfo/info.xml'); + + $schema = \OC::$SERVERROOT . '/resources/app-info.xsd'; + try { + if ($this->isShipped($appId)) { + // Shipped apps are allowed to have the public and default_enabled tags + $schema = \OC::$SERVERROOT . '/resources/app-info-shipped.xsd'; + } + } catch (\Exception $e) { + // Assume it is not shipped + } + $errors = []; - - $info = $this->infoParser->parse($appPath . '/appinfo/info.xml'); - - if (!isset($info['dependencies']['nextcloud']['@attributes']['min-version'])) { - $errors[] = [ - 'type' => 'missingRequirement', - 'field' => 'min', - ]; - $this->emit('InfoChecker', 'missingRequirement', ['min']); - } - - if (!isset($info['dependencies']['nextcloud']['@attributes']['max-version'])) { - $errors[] = [ - 'type' => 'missingRequirement', - 'field' => 'max', - ]; - $this->emit('InfoChecker', 'missingRequirement', ['max']); - } - - foreach ($info as $key => $value) { - if(is_array($value)) { - $value = json_encode($value); - } - if (in_array($key, $this->mandatoryFields)) { - $this->emit('InfoChecker', 'mandatoryFieldFound', [$key, $value]); - continue; - } - - if (in_array($key, $this->optionalFields)) { - $this->emit('InfoChecker', 'optionalFieldFound', [$key, $value]); - continue; - } - - if (in_array($key, $this->deprecatedFields)) { - // skip empty arrays - empty arrays for remote and public are always added - if($value === '[]' && in_array($key, ['public', 'remote', 'info'])) { - continue; - } - $this->emit('InfoChecker', 'deprecatedFieldFound', [$key, $value]); - continue; - } - - $this->emit('InfoChecker', 'unusedFieldFound', [$key, $value]); - } - - foreach ($this->mandatoryFields as $key) { - if(!isset($info[$key])) { - $this->emit('InfoChecker', 'mandatoryFieldMissing', [$key]); + if (!$xml->schemaValidate($schema)) { + foreach (libxml_get_errors() as $error) { $errors[] = [ - 'type' => 'mandatoryFieldMissing', - 'field' => $key, + 'type' => 'parseError', + 'field' => $error->message, ]; + $this->emit('InfoChecker', 'parseError', [$error->message]); } } - $versionFile = $appPath . '/appinfo/version'; - if (is_file($versionFile)) { - $version = trim(file_get_contents($versionFile)); - $this->emit('InfoChecker', 'migrateVersion', [$version]); - } - return $errors; } + + /** + * This is a copy of \OC\App\AppManager::isShipped(), keep both in sync. + * This method is copied, so the code checker works even when Nextcloud is + * not installed yet. The AppManager requires a database connection, which + * fails in that case. + * + * @param string $appId + * @return bool + * @throws \Exception + */ + protected function isShipped(string $appId): bool { + $this->loadShippedJson(); + return \in_array($appId, $this->shippedApps, true); + } + + /** + * This is a copy of \OC\App\AppManager::loadShippedJson(), keep both in sync + * This method is copied, so the code checker works even when Nextcloud is + * not installed yet. The AppManager requires a database connection, which + * fails in that case. + * + * @throws \Exception + */ + protected function loadShippedJson() { + if ($this->shippedApps === null) { + $shippedJson = \OC::$SERVERROOT . '/core/shipped.json'; + if (!file_exists($shippedJson)) { + throw new \Exception("File not found: $shippedJson"); + } + $content = json_decode(file_get_contents($shippedJson), true); + $this->shippedApps = $content['shippedApps']; + $this->alwaysEnabled = $content['alwaysEnabled']; + } + } } diff --git a/resources/app-info-shipped.xsd b/resources/app-info-shipped.xsd new file mode 100644 index 00000000000..97221d1fb9c --- /dev/null +++ b/resources/app-info-shipped.xsd @@ -0,0 +1,671 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/app-info.xsd b/resources/app-info.xsd new file mode 100644 index 00000000000..4460b0f63b9 --- /dev/null +++ b/resources/app-info.xsd @@ -0,0 +1,652 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/apps/testapp-dependency-missing/appinfo/info.xml b/tests/apps/testapp-dependency-missing/appinfo/info.xml deleted file mode 100644 index c765400a76f..00000000000 --- a/tests/apps/testapp-dependency-missing/appinfo/info.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - testapp-infoxml-version - 1.2.3 - Jane - A b c - Abc - Test app - diff --git a/tests/apps/testapp-infoxml/appinfo/info.xml b/tests/apps/testapp-infoxml/appinfo/info.xml deleted file mode 100644 index d4df1c3cd3f..00000000000 --- a/tests/apps/testapp-infoxml/appinfo/info.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - testapp-infoxml - 1.2.3 - Jane - A b c - Abc - Test app - - - - diff --git a/tests/apps/testapp-name-missing/appinfo/info.xml b/tests/apps/testapp-name-missing/appinfo/info.xml deleted file mode 100644 index 591c4361899..00000000000 --- a/tests/apps/testapp-name-missing/appinfo/info.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - testapp-version - 1.1.1 - Jane - A b c - Abc - - - - diff --git a/tests/apps/testapp-version/appinfo/info.xml b/tests/apps/testapp-version/appinfo/info.xml deleted file mode 100644 index 28e2475800f..00000000000 --- a/tests/apps/testapp-version/appinfo/info.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - testapp-version - Jane - A b c - Abc - Test app - - - - diff --git a/tests/apps/testapp-version/appinfo/version b/tests/apps/testapp-version/appinfo/version deleted file mode 100644 index 0495c4a88ca..00000000000 --- a/tests/apps/testapp-version/appinfo/version +++ /dev/null @@ -1 +0,0 @@ -1.2.3 diff --git a/tests/apps/testapp_dependency_missing/appinfo/info.xml b/tests/apps/testapp_dependency_missing/appinfo/info.xml new file mode 100644 index 00000000000..b0ca188aefc --- /dev/null +++ b/tests/apps/testapp_dependency_missing/appinfo/info.xml @@ -0,0 +1,13 @@ + + + testapp_infoxml + Test app + A b c + A b c + 1.2.3 + agpl + Jane + games + https://example.org + diff --git a/tests/apps/testapp_infoxml/appinfo/info.xml b/tests/apps/testapp_infoxml/appinfo/info.xml new file mode 100644 index 00000000000..b7575687fe5 --- /dev/null +++ b/tests/apps/testapp_infoxml/appinfo/info.xml @@ -0,0 +1,16 @@ + + + testapp_infoxml + Test app + A b c + A b c + 1.2.3 + agpl + Jane + games + https://example.org + + + + diff --git a/tests/apps/testapp_name_missing/appinfo/info.xml b/tests/apps/testapp_name_missing/appinfo/info.xml new file mode 100644 index 00000000000..872c8752c75 --- /dev/null +++ b/tests/apps/testapp_name_missing/appinfo/info.xml @@ -0,0 +1,15 @@ + + + testapp_name_missing + A b c + A b c + 1.2.3 + agpl + Jane + games + https://example.org + + + + diff --git a/tests/apps/testapp_version/appinfo/info.xml b/tests/apps/testapp_version/appinfo/info.xml new file mode 100644 index 00000000000..3a48fccd45f --- /dev/null +++ b/tests/apps/testapp_version/appinfo/info.xml @@ -0,0 +1,15 @@ + + + testapp_version + Test app + A b c + A b c + agpl + Jane + games + https://example.org + + + + diff --git a/tests/lib/App/CodeChecker/InfoCheckerTest.php b/tests/lib/App/CodeChecker/InfoCheckerTest.php index 760d9880739..9f354a4611c 100644 --- a/tests/lib/App/CodeChecker/InfoCheckerTest.php +++ b/tests/lib/App/CodeChecker/InfoCheckerTest.php @@ -44,19 +44,21 @@ class InfoCheckerTest extends TestCase { protected function setUp() { parent::setUp(); - $this->infoChecker = new InfoChecker(new InfoParser()); + $this->infoChecker = new InfoChecker(\OC::$server->getAppManager()); } public function appInfoData() { return [ - ['testapp-infoxml', []], - ['testapp-version', [['type' => 'mandatoryFieldMissing', 'field' => 'version']]], - ['testapp-dependency-missing', [ - ['type' => 'missingRequirement', 'field' => 'min'], - ['type' => 'missingRequirement', 'field' => 'max'], - ['type' => 'mandatoryFieldMissing', 'field' => 'dependencies'], + ['testapp_infoxml', []], + ['testapp_version', [ + ['type' => 'parseError', 'field' => 'Element \'licence\': This element is not expected. Expected is one of ( description, version ).' . "\n"], + ]], + ['testapp_dependency_missing', [ + ['type' => 'parseError', 'field' => 'Element \'info\': Missing child element(s). Expected is one of ( repository, screenshot, dependencies ).' . "\n"], + ]], + ['testapp_name_missing', [ + ['type' => 'parseError', 'field' => 'Element \'summary\': This element is not expected. Expected is ( name ).' . "\n"], ]], - ['testapp-name-missing', [['type' => 'mandatoryFieldMissing', 'field' => 'name']]], ]; } @@ -68,6 +70,7 @@ class InfoCheckerTest extends TestCase { */ public function testApps($appId, $expectedErrors) { $errors = $this->infoChecker->analyse($appId); + libxml_clear_errors(); $this->assertEquals($expectedErrors, $errors); } From f095001e4b29229576f7f74881b78bf9b1db2c85 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 7 Feb 2018 16:04:45 +0100 Subject: [PATCH 2/3] Fix info.xml files of shipped apps Signed-off-by: Joas Schilling --- apps/admin_audit/appinfo/info.xml | 16 +++--- apps/comments/appinfo/info.xml | 17 +++--- apps/dav/appinfo/info.xml | 37 +++++++------ apps/encryption/appinfo/info.xml | 40 ++++++++------ apps/federatedfilesharing/appinfo/info.xml | 14 +++-- apps/federation/appinfo/info.xml | 27 ++++++---- apps/files/appinfo/info.xml | 50 ++++++++++-------- apps/files_external/appinfo/info.xml | 35 +++++++------ apps/files_sharing/appinfo/info.xml | 52 +++++++++++-------- apps/files_trashbin/appinfo/info.xml | 20 ++++--- apps/files_versions/appinfo/info.xml | 26 ++++++---- apps/lookup_server_connector/appinfo/info.xml | 18 ++++--- apps/oauth2/appinfo/info.xml | 9 +++- apps/provisioning_api/appinfo/info.xml | 20 ++++--- apps/sharebymail/appinfo/info.xml | 51 +++++++++--------- apps/systemtags/appinfo/info.xml | 19 ++++--- apps/testing/appinfo/info.xml | 18 ++++--- apps/theming/appinfo/info.xml | 20 +++---- apps/twofactor_backupcodes/appinfo/info.xml | 23 ++++---- apps/updatenotification/appinfo/info.xml | 10 ++-- apps/user_ldap/appinfo/info.xml | 23 ++++---- apps/workflowengine/appinfo/info.xml | 20 +++---- 22 files changed, 331 insertions(+), 234 deletions(-) diff --git a/apps/admin_audit/appinfo/info.xml b/apps/admin_audit/appinfo/info.xml index 44abc85f105..054ed9580f2 100644 --- a/apps/admin_audit/appinfo/info.xml +++ b/apps/admin_audit/appinfo/info.xml @@ -1,16 +1,20 @@ - + admin_audit Auditing / Logging + Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions. Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions. - AGPL - Nextcloud 1.4.0 + agpl + Nextcloud AdminAudit - - - + monitoring + https://github.com/nextcloud/server/issues + + + diff --git a/apps/comments/appinfo/info.xml b/apps/comments/appinfo/info.xml index 61a23cf65f8..bc2cfe03054 100644 --- a/apps/comments/appinfo/info.xml +++ b/apps/comments/appinfo/info.xml @@ -1,19 +1,24 @@ - + comments Comments + Files app plugin to add comments to files Files app plugin to add comments to files - AGPL + 1.4.0 + agpl Arthur Schiwon Vincent Petry - 1.4.0 - - - + office + social + https://github.com/nextcloud/server/issues + + + diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml index 7115cacfef2..3afef530e7a 100644 --- a/apps/dav/appinfo/info.xml +++ b/apps/dav/appinfo/info.xml @@ -1,22 +1,24 @@ - + dav WebDAV + WebDAV endpoint WebDAV endpoint - AGPL - owncloud.org 1.5.0 + agpl + owncloud.org + DAV - DAV - - appinfo/v1/publicwebdav.php - + integration + https://github.com/nextcloud/server/issues + OCA\DAV\Migration\FixBirthdayCalendarComponent @@ -24,6 +26,7 @@ OCA\DAV\Migration\BuildCalendarSearchIndex + OCA\DAV\Command\CreateAddressBook OCA\DAV\Command\CreateCalendar @@ -31,18 +34,22 @@ OCA\DAV\Command\SyncSystemAddressBook - - - OCA\DAV\CalDAV\Activity\Filter\Calendar - OCA\DAV\CalDAV\Activity\Filter\Todo - + + OCA\DAV\Settings\CalDAVSettings + + OCA\DAV\CalDAV\Activity\Setting\Calendar OCA\DAV\CalDAV\Activity\Setting\Event OCA\DAV\CalDAV\Activity\Setting\Todo + + OCA\DAV\CalDAV\Activity\Filter\Calendar + OCA\DAV\CalDAV\Activity\Filter\Todo + + OCA\DAV\CalDAV\Activity\Provider\Calendar OCA\DAV\CalDAV\Activity\Provider\Event @@ -50,7 +57,7 @@ - - OCA\DAV\Settings\CalDAVSettings - + + appinfo/v1/publicwebdav.php + diff --git a/apps/encryption/appinfo/info.xml b/apps/encryption/appinfo/info.xml index 5744e5d2d66..2859043e72b 100644 --- a/apps/encryption/appinfo/info.xml +++ b/apps/encryption/appinfo/info.xml @@ -1,6 +1,9 @@ - + encryption + Default encryption module + Default encryption module for server-side encryption In order to use this encryption module you need to enable server-side encryption in the admin settings. Once enabled this module will encrypt @@ -11,35 +14,40 @@ Please read the documentation to know all implications before you decide to enable server-side encryption. - Default encryption module - AGPL + 2.1.0 + agpl Bjoern Schiessle Clark Tomlinson + + + user-encryption admin-encryption - 2.1.0 - - - + files + security + https://github.com/nextcloud/server/issues + openssl - - OCA\Encryption\Settings\Admin - OCA\Encryption\Settings\Personal - - - OCA\Encryption\Command\EnableMasterKey - OCA\Encryption\Command\DisableMasterKey - OCA\Encryption\Command\MigrateKeys - OCA\Encryption\Migration\SetMasterKeyStatus + + + OCA\Encryption\Command\EnableMasterKey + OCA\Encryption\Command\DisableMasterKey + OCA\Encryption\Command\MigrateKeys + + + + OCA\Encryption\Settings\Admin + OCA\Encryption\Settings\Personal + diff --git a/apps/federatedfilesharing/appinfo/info.xml b/apps/federatedfilesharing/appinfo/info.xml index ac5e3f45e95..027e62ed183 100644 --- a/apps/federatedfilesharing/appinfo/info.xml +++ b/apps/federatedfilesharing/appinfo/info.xml @@ -1,17 +1,23 @@ - + federatedfilesharing Federated file sharing + Provide federated file sharing across servers Provide federated file sharing across servers - AGPL + 1.4.0 + agpl Bjoern Schiessle Roeland Jago Douma - 1.4.0 FederatedFileSharing - other + files + social + https://github.com/nextcloud/server/issues + + OCA\FederatedFileSharing\Settings\Admin OCA\FederatedFileSharing\Settings\Personal diff --git a/apps/federation/appinfo/info.xml b/apps/federation/appinfo/info.xml index c7fc2f2431a..e96c50479ae 100644 --- a/apps/federation/appinfo/info.xml +++ b/apps/federation/appinfo/info.xml @@ -1,30 +1,35 @@ - + federation Federation + Federation allows you to connect with other trusted servers to exchange the user directory. Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing. - AGPL - Bjoern Schiessle 1.4.0 + agpl + Bjoern Schiessle Federation - other - - - + + social + https://github.com/nextcloud/server/issues + + + + OCA\Federation\SyncJob - - OCA\Federation\Settings\Admin - - OCA\Federation\Command\SyncFederationAddressBooks + + + OCA\Federation\Settings\Admin + diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index 1faf2c80adc..f5b43070cee 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -1,22 +1,43 @@ - + files Files + File Management File Management - AGPL + 1.9.0 + agpl Robin Appelman Vincent Petry - 1.9.0 - - - user-files + files + https://github.com/nextcloud/server/issues + + + + + + OCA\Files\BackgroundJob\ScanFiles + OCA\Files\BackgroundJob\DeleteOrphanedItems + OCA\Files\BackgroundJob\CleanupFileLocks + + + + OCA\Files\Command\Scan + OCA\Files\Command\DeleteOrphanedFiles + OCA\Files\Command\TransferOwnership + OCA\Files\Command\ScanAppData + + + + OCA\Files\Settings\Admin + @@ -39,23 +60,6 @@ - - OCA\Files\BackgroundJob\ScanFiles - OCA\Files\BackgroundJob\DeleteOrphanedItems - OCA\Files\BackgroundJob\CleanupFileLocks - - - - OCA\Files\Settings\Admin - - - - OCA\Files\Command\Scan - OCA\Files\Command\DeleteOrphanedFiles - OCA\Files\Command\TransferOwnership - OCA\Files\Command\ScanAppData - - Files diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml index a924c32ba25..795c63a60f0 100644 --- a/apps/files_external/appinfo/info.xml +++ b/apps/files_external/appinfo/info.xml @@ -1,38 +1,36 @@ - + files_external External storage support + Adds basic external storage support This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administrators can choose which types of storage to enable and can mount these storage locations for a user, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows users to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file. External storage can be configured using the GUI or at the command line. This second option provides the advanced user with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation. - AGPL + 1.5.0 + agpl Robin Appelman Michael Gapczynski Vincent Petry - - admin-external-storage - - 1.5.0 + Files_External + - 166048 - Files_External + + admin-external-storage + + files + integration + https://github.com/nextcloud/server/issues - - OCA\Files_External\Settings\Admin - OCA\Files_External\Settings\Section - OCA\Files_External\Settings\Personal - OCA\Files_External\Settings\PersonalSection - - OCA\Files_External\Command\ListCommand OCA\Files_External\Command\Config @@ -46,4 +44,11 @@ External storage can be configured using the GUI or at the command line. This se OCA\Files_External\Command\Verify OCA\Files_External\Command\Notify + + + OCA\Files_External\Settings\Admin + OCA\Files_External\Settings\Section + OCA\Files_External\Settings\Personal + OCA\Files_External\Settings\PersonalSection + diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml index 326bd49e9bc..b4c54247267 100644 --- a/apps/files_sharing/appinfo/info.xml +++ b/apps/files_sharing/appinfo/info.xml @@ -1,28 +1,46 @@ - + files_sharing File sharing + File sharing This application enables users to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable users can then share files and folders with other users and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other users outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices. Turning the feature off removes shared files and folders on the server for all share recipients, and also on the sync clients and mobile apps. More information is available in the Nextcloud Documentation. - AGPL + 1.6.0 + agpl Michael Gapczynski Bjoern Schiessle + Files_Sharing - 1.6.0 + + files + social + https://github.com/nextcloud/server/issues - - public.php - - Files_Sharing + + OCA\Files_Sharing\DeleteOrphanedSharesJob + OCA\Files_Sharing\ExpireSharesJob + + + + + OCA\Files_Sharing\Migration\OwncloudGuestShareType + OCA\Files_Sharing\Migration\SetPasswordColumn + + + + + OCA\Files_Sharing\Command\CleanupRemoteStorages + @@ -44,25 +62,13 @@ Turning the feature off removes shared files and folders on the server for all s - - OCA\Files_Sharing\DeleteOrphanedSharesJob - OCA\Files_Sharing\ExpireSharesJob - - - - OCA\Files_Sharing\Command\CleanupRemoteStorages - - - - - OCA\Files_Sharing\Migration\OwncloudGuestShareType - OCA\Files_Sharing\Migration\SetPasswordColumn - - - OCA\Files_Sharing\Collaboration\ShareRecipientSorter + + + public.php + diff --git a/apps/files_trashbin/appinfo/info.xml b/apps/files_trashbin/appinfo/info.xml index 305906a5446..585e61fe1e8 100644 --- a/apps/files_trashbin/appinfo/info.xml +++ b/apps/files_trashbin/appinfo/info.xml @@ -1,26 +1,30 @@ - + files_trashbin Deleted files + This application enables users to restore files that were deleted from the system. This application enables users to restore files that were deleted from the system. It displays a list of deleted files in the web interface, and has options to restore those deleted files back to the users file directories or remove them permanently from the system. Restoring a file also restores related file versions, if the versions application is enabled. When a file is deleted from a share, it can be restored in the same manner, though it is no longer shared. By default, these files remain in the trash bin for 30 days. To prevent a user from running out of disk space, the Deleted files app will not utilize more than 50% of the currently available free quota for deleted files. If the deleted files exceed this limit, the app deletes the oldest files until it gets below this limit. More information is available in the Deleted Files documentation. - AGPL - Bjoern Schiessle - 1.4.0 + agpl + Bjoern Schiessle + Files_Trashbin + - Files_Trashbin - - - user-trashbin + files + https://github.com/nextcloud/server/issues + + + OCA\Files_Trashbin\BackgroundJob\ExpireTrash diff --git a/apps/files_versions/appinfo/info.xml b/apps/files_versions/appinfo/info.xml index 511b1713cb1..8f7e4d7b716 100644 --- a/apps/files_versions/appinfo/info.xml +++ b/apps/files_versions/appinfo/info.xml @@ -1,26 +1,30 @@ - + files_versions Versions - AGPL - Frank Karlitschek - Bjoern Schiessle + This application automatically maintains older versions of files that are changed. - This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions. -In addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation. + This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions. + In addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation. 1.7.0 + agpl + Frank Karlitschek + Bjoern Schiessle + Files_Versions + - Files_Versions - - - user-versions - + files + https://github.com/nextcloud/server/issues + + + OCA\Files_Versions\BackgroundJob\ExpireVersions diff --git a/apps/lookup_server_connector/appinfo/info.xml b/apps/lookup_server_connector/appinfo/info.xml index 31fc4fe8e5f..19ffeb4de1c 100644 --- a/apps/lookup_server_connector/appinfo/info.xml +++ b/apps/lookup_server_connector/appinfo/info.xml @@ -1,18 +1,22 @@ - + lookup_server_connector Lookup Server Connector + Sync public user information with the lookup server Sync public user information with the lookup server - AGPL + 1.2.0 + agpl Bjoern Schiessle LookupServerConnector - 1.2.0 - other - - - + integration + social + https://github.com/nextcloud/server/issues + + + diff --git a/apps/oauth2/appinfo/info.xml b/apps/oauth2/appinfo/info.xml index 0bbad31dab3..ac18b5cdb94 100644 --- a/apps/oauth2/appinfo/info.xml +++ b/apps/oauth2/appinfo/info.xml @@ -1,16 +1,21 @@ - + oauth2 OAuth 2.0 + Allows OAuth2 compatible authentication from other web applications. The OAuth2 app allows administrators to configure the built-in authentication workflow to also allow OAuth2 compatible authentication from other web applications. + 1.2.0 agpl Lukas Reschke OAuth2 - 1.2.0 + + integration + https://github.com/nextcloud/server/issues diff --git a/apps/provisioning_api/appinfo/info.xml b/apps/provisioning_api/appinfo/info.xml index 849e74432f0..05e805c1170 100644 --- a/apps/provisioning_api/appinfo/info.xml +++ b/apps/provisioning_api/appinfo/info.xml @@ -1,7 +1,9 @@ - - + + provisioning_api Provisioning API + This application enables a set of APIs that external systems can use to manage users, groups and apps. This application enables a set of APIs that external systems can use to create, edit, delete and query user attributes, query, set and remove groups, set quota and query total storage used in Nextcloud. Group admin users @@ -11,17 +13,19 @@ listed above. More information is available in the Provisioning API documentation, including example calls and server responses. - AGPL - Tom Needham - - - admin-provisioning-api - 1.4.0 + agpl + Tom Needham Provisioning_API + + + admin-provisioning-api + + integration + https://github.com/nextcloud/server/issues diff --git a/apps/sharebymail/appinfo/info.xml b/apps/sharebymail/appinfo/info.xml index f1cd70a66b3..6bec13e819b 100644 --- a/apps/sharebymail/appinfo/info.xml +++ b/apps/sharebymail/appinfo/info.xml @@ -1,29 +1,32 @@ - - sharebymail - Share by mail - Share provider which allows you to share files by mail - AGPL - Bjoern Schiessle - 1.4.0 - ShareByMail - other - - - - + + sharebymail + Share by mail + Share provider which allows you to share files by mail + Share provider which allows you to share files by mail + 1.4.0 + agpl + Bjoern Schiessle + ShareByMail + - - - + + + + social + https://github.com/nextcloud/server/issues + + + - - OCA\ShareByMail\Settings\Admin - + + OCA\ShareByMail\Settings\Admin + - - - OCA\ShareByMail\Activity - - + + + OCA\ShareByMail\Activity + + diff --git a/apps/systemtags/appinfo/info.xml b/apps/systemtags/appinfo/info.xml index e46daf4b042..6484cd450ca 100644 --- a/apps/systemtags/appinfo/info.xml +++ b/apps/systemtags/appinfo/info.xml @@ -1,21 +1,26 @@ - + systemtags Collaborative tags + Collaborative tagging functionality which shares tags among users. Collaborative tagging functionality which shares tags among users. Great for teams. (If you are a provider with a multi-tenancy installation, it is advised to deactivate this app as tags are shared.) - AGPL + 1.4.0 + agpl Vincent Petry Joas Schilling - - 1.4.0 - - - SystemTags + + files + organization + https://github.com/nextcloud/server/issues + + + OCA\SystemTags\Settings\Admin diff --git a/apps/testing/appinfo/info.xml b/apps/testing/appinfo/info.xml index d0d350a0364..81be7649d8e 100644 --- a/apps/testing/appinfo/info.xml +++ b/apps/testing/appinfo/info.xml @@ -1,15 +1,19 @@ - - + + testing QA testing + This app is only for testing! It is dangerous to have it enabled in a live instance This app is only for testing! It is dangerous to have it enabled in a live instance - AGPL - Joas Schilling 1.4.0 - - - + agpl + Joas Schilling + monitoring + https://github.com/nextcloud/server/issues + + + diff --git a/apps/theming/appinfo/info.xml b/apps/theming/appinfo/info.xml index d2eacea77b3..63ae7d196c1 100644 --- a/apps/theming/appinfo/info.xml +++ b/apps/theming/appinfo/info.xml @@ -1,23 +1,25 @@ - + theming Theming + Adjust the Nextcloud theme Adjust the Nextcloud theme - AGPL - Nextcloud 1.5.0 + agpl + Nextcloud Theming - other - - - - + - + customization + https://github.com/nextcloud/server/issues + + + OCA\Theming\Settings\Admin diff --git a/apps/twofactor_backupcodes/appinfo/info.xml b/apps/twofactor_backupcodes/appinfo/info.xml index f2581de63e0..9fe0071a442 100644 --- a/apps/twofactor_backupcodes/appinfo/info.xml +++ b/apps/twofactor_backupcodes/appinfo/info.xml @@ -1,29 +1,32 @@ - + twofactor_backupcodes Two factor backup codes + A two-factor auth backup codes provider A two-factor auth backup codes provider + 1.3.0 agpl Christoph Wurst - 1.3.0 TwoFactorBackupCodes - other + integration + security + https://github.com/nextcloud/server/issues + + + OCA\TwoFactorBackupCodes\Provider\BackupCodesProvider - - - + + OCA\TwoFactorBackupCodes\Settings\Personal + OCA\TwoFactorBackupCodes\Activity\Provider - - - OCA\TwoFactorBackupCodes\Settings\Personal - diff --git a/apps/updatenotification/appinfo/info.xml b/apps/updatenotification/appinfo/info.xml index 14ec98916ab..a227ccd6557 100644 --- a/apps/updatenotification/appinfo/info.xml +++ b/apps/updatenotification/appinfo/info.xml @@ -1,13 +1,17 @@ - + updatenotification Update notification + Displays update notifications for Nextcloud and provides the SSO for the updater. Displays update notifications for Nextcloud and provides the SSO for the updater. - AGPL - Lukas Reschke 1.4.1 + agpl + Lukas Reschke UpdateNotification + monitoring + https://github.com/nextcloud/server/issues diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml index dbf9a736899..bb5ebce4fc5 100644 --- a/apps/user_ldap/appinfo/info.xml +++ b/apps/user_ldap/appinfo/info.xml @@ -1,43 +1,46 @@ - + user_ldap LDAP user and group backend + This application enables administrators to connect Nextcloud to an LDAP-based user directory. This application enables administrators to connect Nextcloud to an LDAP-based user directory for authentication and provisioning users, groups and user attributes. Admins can configure this application to connect to one or more LDAP directories or Active Directories via an LDAP interface. Attributes such as user quota, email, avatar pictures, group memberships and more can be pulled into Nextcloud from a directory with the appropriate queries and filters. A user logs into Nextcloud with their LDAP or AD credentials, and is granted access based on an authentication request handled by the LDAP or AD server. Nextcloud does not store LDAP or AD passwords, rather these credentials are used to authenticate a user and then Nextcloud uses a session for the user ID. More information is available in the LDAP User and Group Backend documentation. - AGPL + 1.4.0 + agpl Dominik Schmidt Arthur Schiwon - 1.4.0 + User_LDAP admin-ldap + integration + https://github.com/nextcloud/server/issues ldap - User_LDAP - OCA\User_LDAP\Jobs\UpdateGroups OCA\User_LDAP\Jobs\CleanUp OCA\User_LDAP\Jobs\Sync - - OCA\User_LDAP\Settings\Admin - OCA\User_LDAP\Settings\Section - - OCA\User_LDAP\Migration\UUIDFixInsert + + + OCA\User_LDAP\Settings\Admin + OCA\User_LDAP\Settings\Section + diff --git a/apps/workflowengine/appinfo/info.xml b/apps/workflowengine/appinfo/info.xml index 5d51333f750..1c069ca5432 100644 --- a/apps/workflowengine/appinfo/info.xml +++ b/apps/workflowengine/appinfo/info.xml @@ -1,22 +1,24 @@ - + workflowengine Files workflow engine - - AGPL - Morris Jobke + Files workflow engine + Files workflow engine 1.4.0 + agpl + Morris Jobke WorkflowEngine - other - https://github.com/nextcloud/server - https://github.com/nextcloud/server/issues - https://github.com/nextcloud/server.git - + files + https://github.com/nextcloud/server + https://github.com/nextcloud/server/issues + https://github.com/nextcloud/server.git + From 211212f4b3f2897672e3eec26cd073bbcfe85043 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 16 Feb 2018 17:13:23 +0100 Subject: [PATCH 3/3] App manager is not needed anymore Signed-off-by: Joas Schilling --- core/Command/App/CheckCode.php | 3 +-- tests/lib/App/CodeChecker/InfoCheckerTest.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php index a129bcf1e10..530c1d30ec0 100644 --- a/core/Command/App/CheckCode.php +++ b/core/Command/App/CheckCode.php @@ -126,8 +126,7 @@ class CheckCode extends Command implements CompletionAwareInterface { } if(!$input->getOption('skip-validate-info')) { - // Can not inject because of circular dependency - $infoChecker = new InfoChecker(\OC::$server->getAppManager()); + $infoChecker = new InfoChecker(); $infoChecker->listen('InfoChecker', 'parseError', function($error) use ($output) { $output->writeln("Invalid appinfo.xml file found: $error"); }); diff --git a/tests/lib/App/CodeChecker/InfoCheckerTest.php b/tests/lib/App/CodeChecker/InfoCheckerTest.php index 9f354a4611c..3128f902f47 100644 --- a/tests/lib/App/CodeChecker/InfoCheckerTest.php +++ b/tests/lib/App/CodeChecker/InfoCheckerTest.php @@ -44,7 +44,7 @@ class InfoCheckerTest extends TestCase { protected function setUp() { parent::setUp(); - $this->infoChecker = new InfoChecker(\OC::$server->getAppManager()); + $this->infoChecker = new InfoChecker(); } public function appInfoData() {