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

Use of addslashes in assignment/lib.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.3
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Environment:
      Microsoft SQL Server 2005
    • Database:
      Microsoft SQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      When using MSSQL, magic_quotes_sybase gets set to on, which changes the behavior of addslashes. This is already a known issue, I'm assuming, by the function addslashes_js() and associated comments defined in lib/weblib.php.

      This caused incorrect JavaScript generation in mod/assignment/lib.php on line 726 (or so) where addslashes is used to escape a generated link, which would then result in the browser throwing JavaScript errors.

      To fix:

      In mod/assignment/lib.php, on line ~726:

      • Change 'addslashes' to 'addslashes_js'

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              joshbenner Josh Benner
              Tester:
              Nobody
              Participants:
              Component watchers:
              Damyon Wiese
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Oct/07