Skip to content

Conversation

@diox
Copy link
Member

@diox diox commented Nov 26, 2025

Validate that fields that should contain a dict do return one - we're calling this parsing code before the linter has run, so the manifest could be invalid.

When we detect such invalid fields, raise InvalidManifest, the validation task catches that to let the linter run and provide an appropriate error message to the developer.

Fixes mozilla/addons#15688

Testing

  • Submit an add-on with a manifest where one (or more) of the following properties is not an object:
  • developer
  • browser_specific_settings (or applications)
  • browser_specific_settings -> gecko
  • browser_specific_settings -> gecko -> data_collection_permissions

Instead of having a generic error, you should get the proper linter error about the property like "/browser_specific_settings/gecko/data_collection_permissions" must be object for instance.

diox added 2 commits November 25, 2025 17:59
Validate that fields that should contain a dict do return
one - we're calling this parsing code before the linter has
run, so the manifest could be invalid.

When we detect such invalid fields, raise InvalidManifest,
the validation task catches that to let the linter run and
provide an appropriate error message to the developer.
@diox diox marked this pull request as ready for review November 26, 2025 12:53
@diox diox requested review from a team and eviljeff and removed request for a team November 26, 2025 12:53
@diox diox merged commit 10c27b4 into mozilla:master Nov 27, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Handle manifest properties not being the right type

2 participants