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

Postgres versions released March 1st 2018 break some tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.2.7, 3.3.4, 3.4.1
    • Fix Version/s: 3.3.5, 3.4.2
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide
      1. Clone https://github.com/moodlehq/moodle-docker and configure its environment:
        • export MOODLE_DOCKER_WWWROOT=</path/to/moodle>
        • export MOODLE_DOCKER_DB=pgsql (to ensure that we're using the default setting)
        • Ensure that in base.yml you read: image: postgres:9.6.7
      2. Start the docker env and setup the unit tests environment, within the folder where the repo above has been cloned: bin/moodle-docker-compose up -d && bin/moodle-docker-wait-for-db && bin/moodle-docker-compose exec webserver php admin/tool/phpunit/cli/init.php
      3. (Regression) Run the DDL tests:
        • bin/moodle-docker-compose exec webserver php vendor/bin/phpunit --verbose core_ddl_testcase lib/ddl/tests/ddl_test.php
      4. Stop the docker env: bin/moodle-docker-compose down
      5. Edit the base.yml file to update the postgresql image version: image: postgres:9.6.8
      6. Rerun the setup of the docker env including the setup of the unit tests and then run the broken unit tests (DDL)
      Show
      Clone https://github.com/moodlehq/moodle-docker and configure its environment: export MOODLE_DOCKER_WWWROOT=</path/to/moodle> export MOODLE_DOCKER_DB=pgsql (to ensure that we're using the default setting) Ensure that in base.yml you read: image: postgres:9.6.7 Start the docker env and setup the unit tests environment, within the folder where the repo above has been cloned: bin/moodle-docker-compose up -d && bin/moodle-docker-wait-for-db && bin/moodle-docker-compose exec webserver php admin/tool/phpunit/cli/init.php (Regression) Run the DDL tests: bin/moodle-docker-compose exec webserver php vendor/bin/phpunit --verbose core_ddl_testcase lib/ddl/tests/ddl_test.php Stop the docker env: bin/moodle-docker-compose down Edit the base.yml file to update the postgresql image version: image: postgres:9.6. 8 Rerun the setup of the docker env including the setup of the unit tests and then run the broken unit tests (DDL)
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull 3.4 Branch:
      m34_MDL-61626_PgSQL_Table_Name_Could_Be_Schema_Qualified
    • Pull Master Branch:
      m35_MDL-61626_PgSQL_Table_Name_Could_Be_Schema_Qualified

      Description

      CVE-2018-1058 has introduced a regression in some Moodle tests (lib/ddl/tests/ddl_test.php) due to qualifying the table name by its schema name.

      Found on Moodle CI (via docker): MDL-61627 (was MDLSITE-5374).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  19/Mar/18