From fa8d15fe5366494b22033aa9775ee18dd6acc694 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 7 Jan 2021 16:09:10 +0100 Subject: [PATCH] Specify timeout for OAuth 2 requests --- .../install/files/lib/action/AbstractOauth2Action.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/action/AbstractOauth2Action.class.php b/wcfsetup/install/files/lib/action/AbstractOauth2Action.class.php index f9bee21f10..7e336a1533 100644 --- a/wcfsetup/install/files/lib/action/AbstractOauth2Action.class.php +++ b/wcfsetup/install/files/lib/action/AbstractOauth2Action.class.php @@ -44,7 +44,9 @@ abstract class AbstractOauth2Action extends AbstractAction { */ protected final function getHttpClient(): ClientInterface { if (!$this->httpClient) { - $this->httpClient = HttpFactory::makeClient(); + $this->httpClient = HttpFactory::makeClient([ + 'timeout' => 5, + ]); } return $this->httpClient; -- 2.20.1