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

Bootstrap loaded from CDN for privacy exports is fragile

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.4.6, 3.5.3
    • Fix Version/s: None
    • Component/s: Privacy
    • Labels:
      None
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE

      Description

      As of MDL-62491, moodle_content_writer.php loads bootstrap's CSS file from a CDN.

      This is fragile for several reasons:

      • It requests the URL with a plain fopen(), without using the HTTP proxy if one is configured.
      • Failure of the request is not handled, so the process fails with an error if the CDN cannot be contacted.
      • The code is called from within unit tests, so the tests will fail if the CDN cannot be contacted.  I think its better to avoid connecting to external services in a unit test.

      I propose that we have a local copy of the CSS files in the codebase, and copy the appropriate one into the export rather than downloading it from the CDN.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marxjohnson Mark Johnson
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: