Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59539

Oauth2 Issuer - guess_image() accesses undefined property 'discoveryurl'

XMLWordPrintable

    • MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • MDL-59539-master
    • Hide

      Specify a Logo URL

      Show
      Specify a Logo URL
    • Hide

      Create a new issuer through the administration site with the following parameters (OpenId Connect Test server):

         Name: Test

         Client ID: user

         Client Secret: password

         Service base URL: https://mitreid.org/

      Leave the reset as it is. Logo URL must be empty!

      The issuer should be saved without an error. (Currently the Error from the Description is thrown)

      Unfortunately, the test server above has no favicon.ico. However, the error when creating the issue is gone.

       

      Show
      Create a new issuer through the administration site with the following parameters (OpenId Connect Test server):    Name: Test    Client ID: user    Client Secret: password    Service base URL: https://mitreid.org/ Leave the reset as it is. Logo URL must be empty! The issuer should be saved without an error. (Currently the Error from the Description is thrown) Unfortunately, the test server above has no favicon.ico. However, the error when creating the issue is gone.  

      In the function guess_image() of the lib/classes/oauth2/api.php:350 there is a call to get the property 'discoveryurl' of an issuer. However, this property is never defined for an issuer and therefore throws the exception:

      coding_exception: Coding error detected, it must be fixed by a programmer: Unexpected property 'discoveryurl' requested

      This problem does not occur in core, since all predefined issuers have already a predefined image. So this code within

      if (empty($issuer->get('image'))) {
      

      is never called.

            tobias.reischmann Tobias Reischmann
            tobias.reischmann Tobias Reischmann
            Damyon Wiese Damyon Wiese
            David Monllaó David Monllaó
            John Okely John Okely
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.