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:
Tobias Reischmann
2017-07-14 11:27:40 +02:00
parent 8e4341402a
commit 4699f2adf5
+1 -1
View File
@@ -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();