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

broken detection of unicode DB in mysqli driver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB, Forum
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I tried to post my input torture test in the forum and received an error.

      The input is: < > & < > & ' \' ? \

      The error is:
      Error writing to database

      More information about this error

      Debug info: Incorrect string value: '\xE7\xA2\x81 \ ...' for column 'message' at row 1
      INSERT INTO mdl_forum_posts (subject,message,discussion,parent,userid,messageformat,messagetrust,modified,created,mailed,attachment) VALUES(?,?,?,?,?,?,?,?,?,?,?)
      [array (
      0 => 'Re: puppy dogs',
      1 => '<p>< > & &lt; &gt; &amp; \' \\\' ?
      \\\\</p>',
      2 => 7,
      3 => 50,
      4 => '4',
      5 => '1',
      6 => 0,
      7 => 1280737484,
      8 => 1280737484,
      9 => '0',
      10 => '',
      )]
      Stack trace:
      line 383 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 718 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 760 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 3988 of /mod/forum/lib.php: call to mysqli_native_moodle_database->insert_record()
      line 650 of /mod/forum/post.php: call to forum_add_new_post()

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              andyjdavis Andrew Davis
              Tester:
              Nobody
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10