1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-04-02 08:12:47 +01:00
Files
supervisor/tests/addons
Stefan Agner 659735d215 Guard _migrate validator against non-dict add-on configs (#6611)
The _migrate function in addons/validate.py is the first validator in the
SCHEMA_ADDON_CONFIG All() chain and was called directly with raw config data.
If a malformed add-on config file contained a non-dict value (e.g. a string),
config.get() would raise an AttributeError instead of a proper voluptuous
Invalid error, causing an unhandled exception.

Add an isinstance check at the top of _migrate to raise vol.Invalid for
non-dict inputs, letting validation fail gracefully.

Fixes SUPERVISOR-HMP

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 15:54:21 -05:00
..