diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index cb637a6f539..f8cf040336d 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -1,6 +1,6 @@ PyJWT==1.7.1 PyNaCl==1.3.0 -aiohttp==3.7.1 +aiohttp==3.7.3 aiohttp_cors==0.7.0 astral==1.10.1 async_timeout==3.0.1 @@ -29,7 +29,7 @@ scapy==2.4.4 sqlalchemy==1.3.22 voluptuous-serialize==2.4.0 voluptuous==0.12.1 -yarl==1.4.2 +yarl==1.6.3 zeroconf==0.28.8 pycryptodome>=3.6.6 diff --git a/requirements.txt b/requirements.txt index 84f60d92c40..a4e32888047 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -c homeassistant/package_constraints.txt # Home Assistant Core -aiohttp==3.7.1 +aiohttp==3.7.3 astral==1.10.1 async_timeout==3.0.1 attrs==19.3.0 @@ -20,4 +20,4 @@ requests==2.25.1 ruamel.yaml==0.15.100 voluptuous==0.12.1 voluptuous-serialize==2.4.0 -yarl==1.4.2 +yarl==1.6.3 diff --git a/setup.py b/setup.py index c0c0182c0b1..2b05d2ebb2e 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ PROJECT_URLS = { PACKAGES = find_packages(exclude=["tests", "tests.*"]) REQUIRES = [ - "aiohttp==3.7.1", + "aiohttp==3.7.3", "astral==1.10.1", "async_timeout==3.0.1", "attrs==19.3.0", @@ -52,7 +52,7 @@ REQUIRES = [ "ruamel.yaml==0.15.100", "voluptuous==0.12.1", "voluptuous-serialize==2.4.0", - "yarl==1.4.2", + "yarl==1.6.3", ] MIN_PY_VERSION = ".".join(map(str, hass_const.REQUIRED_PYTHON_VER)) diff --git a/tests/components/http/test_security_filter.py b/tests/components/http/test_security_filter.py index 91fde9c6c54..eb1ac54d8f6 100644 --- a/tests/components/http/test_security_filter.py +++ b/tests/components/http/test_security_filter.py @@ -1,6 +1,7 @@ """Test security filter middleware.""" from aiohttp import web import pytest +import urllib3 from homeassistant.components.http.security_filter import setup_security_filter @@ -53,7 +54,7 @@ async def test_ok_requests(request_path, request_params, aiohttp_client): ], ) async def test_bad_requests( - request_path, request_params, fail_on_query_string, aiohttp_client, caplog + request_path, request_params, fail_on_query_string, aiohttp_client, caplog, loop ): """Test request paths that should be filtered.""" app = web.Application() @@ -62,7 +63,22 @@ async def test_bad_requests( setup_security_filter(app) mock_api_client = await aiohttp_client(app) - resp = await mock_api_client.get(request_path, params=request_params) + + # Manual params handling + if request_params: + raw_params = "&".join(f"{val}={key}" for val, key in request_params.items()) + man_params = f"?{raw_params}" + else: + man_params = "" + + http = urllib3.PoolManager() + resp = await loop.run_in_executor( + None, + http.request, + "GET", + f"http://{mock_api_client.host}:{mock_api_client.port}/{request_path}{man_params}", + request_params, + ) assert resp.status == 400 diff --git a/tests/testing_config/media/not_media.txt b/tests/testing_config/media/not_media.txt index e69de29bb2d..d8f2010dc98 100644 --- a/tests/testing_config/media/not_media.txt +++ b/tests/testing_config/media/not_media.txt @@ -0,0 +1 @@ +This is just a text \ No newline at end of file diff --git a/tests/testing_config/media/test.mp3 b/tests/testing_config/media/test.mp3 index e69de29bb2d..8208765d04f 100644 --- a/tests/testing_config/media/test.mp3 +++ b/tests/testing_config/media/test.mp3 @@ -0,0 +1 @@ +I sing a song \ No newline at end of file