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

Backend issuer form validation broken after MDL-71017

    XMLWordPrintable

Details

    • 1
    • Team Hedgehog Sprint 2.1

    Description

      Regression from MDL-71017. Specifically 0152fdbdff52b795ba1c6783d1d4b24308d6e09b.

      The errors param is a a reference, but it's wiped straight away:
      https://github.com/moodle/moodle/blob/07d40a91ee2e4e87ee4aed4f66d4295efabd0a54/admin/tool/oauth2/classes/form/issuer.php#L246-L247

      This shouldn't be happening. This results in the validation checks (e.g. checking that the base URL is HTTPS) being thrown outside the form page as exceptions, which isn't great. This wasn't a problem in 3.10, where the aforementioned check displays as a form validation message under the respective form field.

      Replication steps:

      1. Go to site admin > Server > OAuth 2 Services
      2. Create a new 'custom' issuer (using the "Custom' button below the table)
      3. Enter the mandatory fields: name, client id and client secret.
      4. Enter 'http://example.com' in the Service base URL field
      5. Hit enter
        Expected: You see a form validation error on the form
        Actual: You see an exception message and are taken away from the form

      Attachments

        Issue Links

          Activity

            People

              jaked Jake Dallimore
              jaked Jake Dallimore
              Huong Nguyen Huong Nguyen
              Paul Holden Paul Holden
              CiBoT CiBoT
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Mar/23

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 15 minutes
                  1h 15m