Skip to content

Commit

Permalink
Skip: Update dependency aiohttp to v3.10.2 [SECURITY] (merge commit)
Browse files Browse the repository at this point in the history
Merge branch 'renovate/pypi-aiohttp-vulnerability' into 'main'
* Fix mypy issues

* Skip: Update dependency aiohttp to v3.10.2 [SECURITY]

See merge request https://gitlab.ci.csc.fi/sds-dev/sd-submit/metadata-submitter/-/merge_requests/898

Approved-by: Hang Le <[email protected]>
Co-authored-by: Joonatan Mäkinen <[email protected]>
Co-authored-by: renovate-bot <group_183_bot_2d78ce980e0cdf1c1f6cfb0fa4c95beb@noreply.gitlab.ci.csc.fi>
Merged by Hang Le <[email protected]>
  • Loading branch information
Hang Le committed Aug 23, 2024
2 parents 45d1426 + f8c83ff commit 065c1d9
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions metadata_backend/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Any, Optional

import aiohttp_session
from aiohttp import web
from aiohttp import ClientTimeout, web
from aiohttp.client_exceptions import ClientConnectorError, InvalidURL
from aiohttp.web import Request, Response
from idpyoidc.client.rp_handler import RPHandler
Expand Down Expand Up @@ -340,7 +340,7 @@ async def _healtcheck(self) -> dict[str, str]:
async with self._client.request(
method="GET",
url=f"{self.base_url}/.well-known/openid-configuration",
timeout=10,
timeout=ClientTimeout(total=10),
) as response:
content = await response.json()
LOG.debug("AAI REST API response content is: %r.", content)
Expand Down
4 changes: 2 additions & 2 deletions metadata_backend/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ async def init(
middlewares = [http_error_handler, check_session]
if inject_middleware:
middlewares = middlewares + inject_middleware
api = web.Application(middlewares=middlewares)
api = web.Application(middlewares=middlewares) # type: ignore

sec_key = base64.urlsafe_b64decode(Fernet.generate_key())
session_middleware = aiohttp_session.session_middleware(
aiohttp_session.cookie_storage.EncryptedCookieStorage(sec_key)
)
server = web.Application(middlewares=[session_middleware])
server = web.Application(middlewares=[session_middleware]) # type: ignore

metax_handler = MetaxServiceHandler()
datacite_handler = DataciteServiceHandler()
Expand Down
2 changes: 1 addition & 1 deletion metadata_backend/services/datacite_service_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def _healtcheck(self) -> dict[str, Any]:
async with self._client.request(
method="GET",
url=f"{self.base_url}/heartbeat",
timeout=10,
timeout=ClientTimeout(total=10),
) as response:
content = await response.text()
LOG.info("Datacite REST API response content is: %s.", content)
Expand Down
4 changes: 2 additions & 2 deletions metadata_backend/services/metax_service_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import time
from typing import Any

from aiohttp import BasicAuth, web
from aiohttp import BasicAuth, ClientTimeout, web
from aiohttp.client_exceptions import ClientConnectorError, InvalidURL
from yarl import URL

Expand Down Expand Up @@ -316,7 +316,7 @@ async def _healtcheck(self) -> dict[str, str]:
async with self._client.request(
method="GET",
url=f"{URL(metax_config['url'])}/watchman/ping/",
timeout=10,
timeout=ClientTimeout(total=10),
) as response:
LOG.debug("Metax REST API status is: %s.", response.status)
content = await response.text()
Expand Down
4 changes: 2 additions & 2 deletions metadata_backend/services/rems_service_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import time
from typing import Any

from aiohttp import web
from aiohttp import ClientTimeout, web
from aiohttp.client_exceptions import ClientConnectorError, InvalidURL
from yarl import URL

Expand Down Expand Up @@ -181,7 +181,7 @@ async def _healtcheck(self) -> dict[str, Any]:
async with self._client.request(
method="GET",
url=f"{self.base_url}/health",
timeout=10,
timeout=ClientTimeout(total=10),
) as response:
LOG.debug("REMS REST API status is: %s.", response.status)
content = await response.json()
Expand Down
2 changes: 1 addition & 1 deletion metadata_backend/services/service_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def _request(
url=url,
params=params,
json=json_data,
timeout=timeout,
timeout=ClientTimeout(total=timeout),
) as response:
if not response.ok:
content = await response.text()
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
aiofiles==24.1.0
# via -r requirements-dev.in
aiohttp==3.9.5
aiohttp==3.10.5
# via
# -r requirements.txt
# aiohttp-session
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile requirements.in
#
aiohttp==3.9.5
aiohttp==3.10.5
# via
# -r requirements.in
# aiohttp-session
Expand Down

0 comments on commit 065c1d9

Please sign in to comment.