From 8e07b716444431a78a9ec9a18cc30c2c404440ce Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 24 Mar 2023 09:38:08 -1000 Subject: [PATCH] Use the json load helper in a few more incoming web requests (#90194) * Use the json load helper in a few more incoming web requests * drop hassio change as there is no coverage there * Remove everything except emulated_hue since its has its own site/web --- homeassistant/components/emulated_hue/hue_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/emulated_hue/hue_api.py b/homeassistant/components/emulated_hue/hue_api.py index 41c25943a77..f779f5d8e94 100644 --- a/homeassistant/components/emulated_hue/hue_api.py +++ b/homeassistant/components/emulated_hue/hue_api.py @@ -64,6 +64,7 @@ from homeassistant.const import ( ) from homeassistant.core import State from homeassistant.helpers.event import async_track_state_change_event +from homeassistant.util.json import json_loads from homeassistant.util.network import is_local from .config import Config @@ -138,7 +139,7 @@ class HueUsernameView(HomeAssistantView): return self.json_message("Only local IPs allowed", HTTPStatus.UNAUTHORIZED) try: - data = await request.json() + data = await request.json(loads=json_loads) except ValueError: return self.json_message("Invalid JSON", HTTPStatus.BAD_REQUEST)