Add extra check for tuple length to avoid out of range error in Frontend resolver (#66470)

This commit is contained in:
breakthestatic 2022-04-14 11:57:08 -07:00 committed by GitHub
parent 45341c69c2
commit 7474e2f96a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -533,6 +533,7 @@ class IndexView(web_urldispatcher.AbstractResource):
""" """
if ( if (
request.path != "/" request.path != "/"
and len(request.url.parts) > 1
and request.url.parts[1] not in self.hass.data[DATA_PANELS] and request.url.parts[1] not in self.hass.data[DATA_PANELS]
): ):
return None, set() return None, set()