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

This commit is contained in:
Franck Nijhof 2022-07-28 18:20:39 +02:00 committed by GitHub
parent a020482c23
commit 166e58eaa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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")