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'.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user