addons-linter icon indicating copy to clipboard operation
addons-linter copied to clipboard

Additional properties shouldn't be allowed by default (for "object" type)

Open willdurand opened this issue 2 months ago • 2 comments

Firefox has extra logic when additionalProperties is missing, see: https://searchfox.org/firefox-main/rev/8e5d58cfed616cb90586c614e53d8ab1ffc8af27/toolkit/components/extensions/Schemas.sys.mjs#2314-2327. That essentially makes additionalProperties set to false by default, while the json schema spec seems to indicate that additional properties are allowed when additionalProperties is omitted.

We should change fix the linter to be more like Firefox.

willdurand avatar Oct 21 '25 12:10 willdurand

We should change fix the linter to be more like Firefox.

We should change Firefox to default to allowing unrecognized properties. This is also the general agreement in the WECG, and there is already a bug on file for that: https://bugzilla.mozilla.org/show_bug.cgi?id=1831417

Rob--W avatar Oct 21 '25 12:10 Rob--W

Yeah, I don't disagree but at the moment the linter is supposed to match the Firefox behavior, and it does not as far as this issue is concerned :/

willdurand avatar Oct 22 '25 09:10 willdurand