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

preg_xxxx() critical bug under PHP 5.2.4, tests required...

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7.3, 1.8.3, 1.9
    • Fix Version/s: 1.7.3, 1.8.3, 1.9
    • Component/s: Unknown
    • Labels:
      None
    • Environment:
      PHP 5.2.4
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      I was trying to detect why one MSSQL server was causing a lot of problems with simple SQLs when I've discovered that the root of the problem was that one preg_match_all() function wasn't performing its job under BIG texts.

      I've attached one script (preg_match_all_test.php) that reproduce the problem in my system. Curiously, the limit seems to be 99998 chars. By adding one more char (99999) the function doesn't work properly.

      It's a major problem because it can break tons of things (the mssql_n driver, backup & restore relinking, filters...) potentially anything trying to grep over more than 99998 chars.

      Please, can you execute the script and add your results here? TIA!

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

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