From 9e41d0c5b0265a3a06b3f4505378a8858970ec81 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 15 Aug 2019 14:51:28 +0200 Subject: [PATCH 1/4] Bump version 177 --- hassio/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hassio/const.py b/hassio/const.py index e15b3893f..ff06edda2 100644 --- a/hassio/const.py +++ b/hassio/const.py @@ -3,7 +3,7 @@ from pathlib import Path from ipaddress import ip_network -HASSIO_VERSION = "176" +HASSIO_VERSION = "177" URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons" URL_HASSIO_VERSION = "https://version.home-assistant.io/{channel}.json" From 35033d1f761542d10d84c2e1b5355d2603d4b1fd Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 15 Aug 2019 22:38:34 +0200 Subject: [PATCH 2/4] Allow manager role to access DNS API (#1219) --- hassio/api/security.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hassio/api/security.py b/hassio/api/security.py index d84cb9fe7..7346097db 100644 --- a/hassio/api/security.py +++ b/hassio/api/security.py @@ -67,6 +67,7 @@ ADDONS_ROLE_ACCESS = { ), ROLE_MANAGER: re.compile( r"^(?:" + r"|/dns/.*" r"|/homeassistant/.+" r"|/host/.+" r"|/hardware/.+" From b5ed6c586aaf4ed303777ebf69d03900cd354789 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 15 Aug 2019 23:05:04 +0200 Subject: [PATCH 3/4] Cleanup ingress panel on add-on uninstall (#1220) * Cleanup ingress panel on add-on uninstall * Update __init__.py --- hassio/addons/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hassio/addons/__init__.py b/hassio/addons/__init__.py index e522da543..c6e1a6fb7 100644 --- a/hassio/addons/__init__.py +++ b/hassio/addons/__init__.py @@ -11,6 +11,7 @@ from ..exceptions import ( AddonsError, AddonsNotSupportedError, DockerAPIError, + HomeAssistantAPIError, HostAppArmorError, ) from ..store.addon import AddonStore @@ -155,8 +156,15 @@ class AddonManager(CoreSysAttributes): with suppress(HostAppArmorError): await addon.uninstall_apparmor() + # Cleanup Ingress panel from sidebar + if addon.ingress_panel: + addon.ingress_panel = False + with suppress(HomeAssistantAPIError): + await self.sys_ingress.update_hass_panel(addon) + # Cleanup internal data addon.remove_discovery() + self.data.uninstall(addon) self.local.pop(slug) From 9c2c95757df6f70990b81838737719e0aa1d81f6 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 15 Aug 2019 23:48:14 +0200 Subject: [PATCH 4/4] Validate dns better (#1221) --- hassio/validate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hassio/validate.py b/hassio/validate.py index 068e64aa1..b45792ecd 100644 --- a/hassio/validate.py +++ b/hassio/validate.py @@ -51,7 +51,8 @@ UUID_MATCH = vol.Match(r"^[0-9a-f]{32}$") SHA256 = vol.Match(r"^[0-9a-f]{64}$") TOKEN = vol.Match(r"^[0-9a-f]{32,256}$") LOG_LEVEL = vol.In(["debug", "info", "warning", "error", "critical"]) -DNS_SERVER_LIST = vol.All([vol.Url()], vol.Length(max=8)) +DNS_URL = vol.Match(r"^dns://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$") +DNS_SERVER_LIST = vol.All([DNS_URL], vol.Length(max=8)) def validate_repository(repository):