Skip to content

Commit

Permalink
fix: added socket timeout on rp initiated logout
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Mar 23, 2023
1 parent f30f978 commit c5a6028
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spid_cie_oidc/relying_party/views/rp_initiated_logout.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ def oidc_rpinitiated_logout(request):
client_assertion_type = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
)
try:
requests.post(revocation_endpoint_url, data = revocation_request) # nosec - B113
requests.post(
revocation_endpoint_url,
data = revocation_request,
timeout=getattr(
settings, "HTTPC_TIMEOUT", 8
)
) # nosec - B113
except Exception as e: # pragma: no cover
logger.warning(f"Token revocation failed: {e}")
auth_tokens.update(revoked = timezone.localtime())
Expand Down

0 comments on commit c5a6028

Please sign in to comment.