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

Upgrade MathJax to the latest version

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.11, 4.0
    • Fix Version/s: 3.11
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      Upgrading test

      1. Before patch (moodle.git)
        1. Create a new Moodle instance WITHOUT this patch.
        2. Once done, go to "Site administration -> plugins -> filters -> Mathjax"
          1. Check that both MathJax URL setting and the default value point to version 2.7.8. e.g. "https://cdn.jsdelivr.net/npm/mathjax@2.7.8/MathJax.js"
      2. After patch (switch to integration.git)
        1. Upgrade the site to (integration.git)
        2. Check that Filter MathJax have an upgrade to perform.
        3. Check that no error appears when the instance is upgrading.
        4. Go to "Site administration -> plugins -> filters -> Mathjax"
        5. Check that that both MathJax URL setting and the default value now point to version 2.7.9. e.g. "https://cdn.jsdelivr.net/npm/mathjax@2.7.9/MathJax.js"

      Manual testing 2

      1. Create a regular user and enrol as student in a course
      2. Log in as this student.
      3. Open the user Edit Profile page.
      4. In the Description WYSIWYG, remove any existing content, and paste the following ( use the attached screenshot as a reference just in case:   ): 

        $$ \unicode {<img src=123 onerror=alert(123)>} $$

        $$ x = \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12) $$

      5. Press "Update profile".
      6. Logout and login as admin
      7. Go to the user profile.
        1. Check that no javascript alert popup appears
        2. Check that in the description  appears something like the screenshot 
      8. Edit the user profile
        1. Check that no javascript alert popup appears
        2. Check that the description field looks like the screenshot
      Show
      Upgrading test Before patch (moodle.git) Create a new Moodle instance WITHOUT this patch. Once done, go to "Site administration -> plugins -> filters -> Mathjax" Check that both MathJax URL setting and the default value point to version 2.7.8. e.g. "https://cdn.jsdelivr.net/npm/mathjax@2.7.8/MathJax.js" After patch (switch to integration.git) Upgrade the site to (integration.git) Check that Filter MathJax have an upgrade to perform. Check that no error appears when the instance is upgrading. Go to "Site administration -> plugins -> filters -> Mathjax" Check that that both MathJax URL setting and the default value now point to version 2.7.9. e.g. "https://cdn.jsdelivr.net/npm/mathjax@2.7.9/MathJax.js" Manual testing 2 Create a regular user and enrol as student in a course Log in as this student. Open the user Edit Profile page. In the Description WYSIWYG, remove any existing content, and paste the following ( use the attached screenshot as a reference just in case:   ):  $$ \unicode {<img src=123 onerror=alert(123)>} $$ $$ x = \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12) $$ Press "Update profile". Logout and login as admin Go to the user profile. Check that no javascript alert popup appears Check that in the description  appears something like the screenshot  Edit the user profile Check that no javascript alert popup appears Check that the description field looks like the screenshot
    • Affected Branches:
      MOODLE_311_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Epic Link:
    • Pull 3.11 Branch:
      MDL-70317-311
    • Pull Master Branch:
      MDL-70317-master

      Description

      MathJax ($CFG->httpsurl in filter_mathjaxloader) 2.7.8  --> 2.7.9 Yes https://cdn.jsdelivr.net/npm/mathjax@2.7.9/MathJax.js 

        Attachments

        1. MDL-70317.jpg
          MDL-70317.jpg
          61 kB
        2. screenshot_005.png
          screenshot_005.png
          20 kB
        3. screenshot_005 (1).png
          screenshot_005 (1).png
          20 kB
        4. screenshot_006.png
          screenshot_006.png
          44 kB

          Activity

            People

            Assignee:
            lucaboesch Luca Bösch
            Reporter:
            sarjona Sara Arjona (@sarjona)
            Peer reviewer:
            Ilya Tregubov
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              10/May/21

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 55 minutes
                2h 55m