Skip to content

fix(parser): reject app IDs longer than 32 characters in info.xml#1811

Open
miaulalala wants to merge 1 commit into
masterfrom
fix/app-id-length-limit
Open

fix(parser): reject app IDs longer than 32 characters in info.xml#1811
miaulalala wants to merge 1 commit into
masterfrom
fix/app-id-length-limit

Conversation

@miaulalala

Copy link
Copy Markdown
Contributor

Summary

  • Enforce a 32-character maxLength on the <id> element of info.xml in the release XSD, matching the varchar(32) limit Nextcloud server's AppConfig uses for app IDs.
  • Uploads with an oversized app ID are now rejected at parse/validation time with a clear InvalidAppMetadataXmlException (surfaced as a 400 ValidationError), instead of being silently accepted and later crashing Nextcloud server's apps list (InvalidArgumentException: Value (...) for app is too long (32)) once the app is installed.

Fixes #1809

Test plan

  • Added fixture nextcloudappstore/api/v1/tests/data/infoxmls/toolongid.xml using the real-world 39-character offending app ID (skynettechnologiesallinoneaccessibility) from the issue.
  • Added test_parse_too_long_id asserting the parser raises InvalidAppMetadataXmlException for that fixture.
  • Ran python manage.py test nextcloudappstore.api.v1.tests.test_parser --settings nextcloudappstore.settings.development — all 61 tests pass, including existing fixtures with short IDs (no regressions).

🤖 Generated with Claude Code

@miaulalala miaulalala self-assigned this Jul 6, 2026
@miaulalala miaulalala requested a review from edward-ly July 6, 2026 12:39
@miaulalala miaulalala added bug release critical security Pull requests that address a security vulnerability 3. to review labels Jul 6, 2026
Nextcloud server stores app IDs in a varchar(32) column and crashes with
an uncaught InvalidArgumentException when reading config for apps whose
ID exceeds that limit. Enforce the same limit at upload time via the
info.xml XSD so oversized IDs are rejected with a clear error instead of
being silently accepted and later crashing server installs.

Fixes #1809

Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala force-pushed the fix/app-id-length-limit branch from 1173e6b to 5894662 Compare July 6, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug release critical security Pull requests that address a security vulnerability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emergency: App store API crashes with InvalidArgumentException due to newly added app with long ID (>32 chars)

1 participant