From c706575a0b9b5af592288405ff1c71c8951c100b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 31 Jul 2024 18:11:51 +0200 Subject: [PATCH] CS fix --- program/include/rcmail_oauth.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/program/include/rcmail_oauth.php b/program/include/rcmail_oauth.php index 8478cdc4915..71376443de9 100644 --- a/program/include/rcmail_oauth.php +++ b/program/include/rcmail_oauth.php @@ -160,7 +160,6 @@ public function __construct($options = []) 'user_email' => ['email'], 'language' => ['locale'], ]), - 'scope' => $this->rcmail->config->get('oauth_scope', ''), 'timeout' => $this->rcmail->config->get('oauth_timeout', 10), 'verify_peer' => $this->rcmail->config->get('oauth_verify_peer', true), @@ -209,10 +208,12 @@ protected function discover(): void if (empty($config_uri)) { return; } + $key_cache = 'discovery.' . md5($config_uri); try { $data = $this->cache ? $this->cache->get($key_cache) : null; + if ($data === null) { // Caveat: if .well-known URL is not answering it will break login display (will not display the button) $response = $this->http_client->get($config_uri); @@ -392,8 +393,6 @@ protected static function base64url_encode($payload) */ public function jwt_decode($jwt) { - $body = []; - [$headb64, $bodyb64, $cryptob64] = explode('.', $jwt); $header = json_decode(static::base64url_decode($headb64), true);