No more opt-out auth (#18854)

* No more opt-out auth

* Fix var
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-12-02 16:32:53 +01:00
1 parent ae9e3d83d7
commit d1a621601d
42 files changed
+307 -473

No files matched your search

+1 -1
View File
@@ -242,7 +242,7 @@ class HTML5PushCallbackView(HomeAssistantView):
# 2b. If decode is unsuccessful, return a 401.
target_check = jwt.decode(token, verify=False)
if target_check[ATTR_TARGET] in self.registrations:
if target_check.get(ATTR_TARGET) in self.registrations:
possible_target = self.registrations[target_check[ATTR_TARGET]]
key = possible_target[ATTR_SUBSCRIPTION][ATTR_KEYS][ATTR_AUTH]
try: