Fix camera token to trigger authentication IP ban (#75870)

This commit is contained in:
Franck Nijhof
2022-07-28 18:20:39 +02:00
parent 2bf10799ed
commit f98d95c76f

View File

@@ -715,7 +715,9 @@ class CameraView(HomeAssistantView):
)
if not authenticated:
raise web.HTTPUnauthorized()
if request[KEY_AUTHENTICATED]:
raise web.HTTPUnauthorized()
raise web.HTTPForbidden()
if not camera.is_on:
_LOGGER.debug("Camera is off")