Specify timeout for OAuth 2 requests
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 7 Jan 2021 15:09:10 +0000 (16:09 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 7 Jan 2021 15:49:57 +0000 (16:49 +0100)
wcfsetup/install/files/lib/action/AbstractOauth2Action.class.php

index f9bee21f10d5313dcd0e888ad34a1a9749c4c55c..7e336a153395bb06248e251578ae1b6d800d15cd 100644 (file)
@@ -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;