From d029841300b1daff640f4509099778c4e9abf32a Mon Sep 17 00:00:00 2001 From: Tobias Reischmann Date: Fri, 14 Jul 2017 11:10:50 +0200 Subject: [PATCH] MDL-59539 oauth2/issuer: Changed baseurl for guessing image URL The url, which was used for guessing the image, was queried with the key 'discoveryurl', which is not defined in the context of an issuer. The baseurl should be sufficient to retrieve the favicon.ico from a server. That's why the key for was changed from 'discoveryurl' to 'baseurl'. --- lib/classes/oauth2/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/oauth2/api.php b/lib/classes/oauth2/api.php index d7c0cad7d42..966ea3ffa06 100644 --- a/lib/classes/oauth2/api.php +++ b/lib/classes/oauth2/api.php @@ -349,7 +349,7 @@ class api { */ protected static function guess_image($issuer) { if (empty($issuer->get('image'))) { - $baseurl = parse_url($issuer->get('discoveryurl')); + $baseurl = parse_url($issuer->get('baseurl')); $imageurl = $baseurl['scheme'] . '://' . $baseurl['host'] . '/favicon.ico'; $issuer->set('image', $imageurl); $issuer->update();