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

Use of addslashes in assignment/lib.php

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.2
    • 1.8.3
    • Assignment (2.2)
    • None
    • Microsoft SQL Server 2005
    • Microsoft SQL
    • MOODLE_18_STABLE
    • 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

            skodak Petr Skoda
            joshbenner Josh Benner
            Nobody Nobody
            Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Oct/07