Skip to content
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

## [Unreleased]

### Fixed

- Reject app IDs longer than 32 characters during upload instead of letting Nextcloud server crash on install. #1809

## [4.11.3] - 2026-01-05

### Changed
Expand Down
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-FileCopyrightText = "2016-2025 Nextcloud translators"
SPDX-License-Identifier = "AGPL-3.0-or-later"

[[annotations]]
path = [".tx/config", "docs/developer.rst", "docs/documentation.rst", "docs/index.rst", "docs/translation.rst", "nextcloudappstore/api/v1/tests/data/archives/appinfosymlink.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/appsymlink.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/changelog.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/contacts.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/empty.zip", "nextcloudappstore/api/v1/tests/data/archives/full.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/invalid.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/invalidname.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/minimal.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/multiplefolders.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/symlink.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/twofactor_u2f.tar.gz", "nextcloudappstore/certificate/tests/data/archives/minimal.tar.gz", "nextcloudappstore/api/v1/tests/data/certificates/news-old.crt", "nextcloudappstore/api/v1/tests/data/infoxmls/badcommand.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/broken-xml.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/digits.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/entities.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/full.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/fullimport.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/invalid.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/invalid-elements.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/minimal.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/news.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/nextcloud.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/no_en_description.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/no_en_name.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/no_en_summary.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/prerelease.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/repair-and-jobs.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/settings-and-activity-and-nav.xml", "nextcloudappstore/core/fixtures/categories.json", "nextcloudappstore/core/fixtures/databases.json", "nextcloudappstore/core/fixtures/licenses.json", "nextcloudappstore/core/static/assets/img/banner.jpg"]
path = [".tx/config", "docs/developer.rst", "docs/documentation.rst", "docs/index.rst", "docs/translation.rst", "nextcloudappstore/api/v1/tests/data/archives/appinfosymlink.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/appsymlink.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/changelog.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/contacts.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/empty.zip", "nextcloudappstore/api/v1/tests/data/archives/full.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/invalid.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/invalidname.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/minimal.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/multiplefolders.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/symlink.tar.gz", "nextcloudappstore/api/v1/tests/data/archives/twofactor_u2f.tar.gz", "nextcloudappstore/certificate/tests/data/archives/minimal.tar.gz", "nextcloudappstore/api/v1/tests/data/certificates/news-old.crt", "nextcloudappstore/api/v1/tests/data/infoxmls/badcommand.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/broken-xml.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/digits.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/entities.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/full.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/fullimport.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/invalid.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/invalid-elements.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/minimal.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/news.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/nextcloud.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/no_en_description.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/no_en_name.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/no_en_summary.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/prerelease.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/repair-and-jobs.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/settings-and-activity-and-nav.xml", "nextcloudappstore/api/v1/tests/data/infoxmls/toolongid.xml", "nextcloudappstore/core/fixtures/categories.json", "nextcloudappstore/core/fixtures/databases.json", "nextcloudappstore/core/fixtures/licenses.json", "nextcloudappstore/core/static/assets/img/banner.jpg"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2016 Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "AGPL-3.0-or-later"
Expand Down
1 change: 1 addition & 0 deletions nextcloudappstore/api/v1/release/info.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
<xs:simpleType name="id">
<xs:restriction base="limited-string">
<xs:pattern value="[a-z]+[a-z0-9_]*[a-z0-9]+"/>
<xs:maxLength value="32"/>
</xs:restriction>
</xs:simpleType>

Expand Down
15 changes: 15 additions & 0 deletions nextcloudappstore/api/v1/tests/data/infoxmls/toolongid.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../release/info.xsd">
<id>skynettechnologiesallinoneaccessibility</id>
<name>News</name>
<summary>An RSS/Atom feed reader</summary>
<description>An RSS/Atom feed reader</description>
<version>8.8.2</version>
<licence>AGPL-3.0-or-later</licence>
<author>Bernhard Posselt</author>
<category>multimedia</category>
<bugs>https://github.com/nextcloud/news/issues</bugs>
<dependencies>
<nextcloud min-version="31" max-version="32"/>
</dependencies>
</info>
5 changes: 5 additions & 0 deletions nextcloudappstore/api/v1/tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def test_parse_digit_id(self):
result = parse_app_metadata(xml, self.config.info_schema, self.config.pre_info_xslt, self.config.info_xslt)
self.assertEqual("twofactor_u2f", result["app"]["id"])

def test_parse_too_long_id(self):
xml = self._get_contents("data/infoxmls/toolongid.xml")
with self.assertRaises(InvalidAppMetadataXmlException):
parse_app_metadata(xml, self.config.info_schema, self.config.pre_info_xslt, self.config.info_xslt)

def test_parse_invalid_elements(self):
xml = self._get_contents("data/infoxmls/invalid-elements.xml")
with self.assertRaises(InvalidAppMetadataXmlException):
Expand Down
Loading