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

Javascript strings not correctly scaped causes failure on some components

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7, 1.7.1
    • Fix Version/s: 1.8.7, 1.9.3, 2.0
    • Component/s: SCORM
    • Labels:
      None
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Proof of concept: put \' character in errorlogs string from scorm. Then try to put a scorm activity (you'll get a "no manifest found" error). See mod.html in scorm directory and the line result.concat('<?php print_string('errorlogs','scorm',NULL,"'") ?>:\n'+errorlogs);

      If errorlogs has a ' in it causes a problem because the string within concat is prematurely closed.

      I don't think putting a
      before the \' in the language file is the best solution. Perhaps this strings are reused in another context... i don't know really :-P So here comes this report

      Thanks in advance

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              danmarsden Dan Marsden
              Reporter:
              jsegarra Juan Segarra Montesinos
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Oct/08