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

MUC: Memcache server configuration too sensitive to whitespace

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.4
    • Fix Version/s: 2.4.8, 2.5.4, 2.6
    • Component/s: Caching
    • Labels:
    • Testing Instructions:
      Hide

      NOTE: Test requires access to dataroot directory.

      1. Go to cache configuration page (System admin/Plugins/Caching/Configuration).
      2. Under 'Installed cache stores', click 'Add instance' in the memcache row
      3. For store name, type 'Test'. For servers, type: ' test.example.org ' (with spaces at start and end), then hit return to add a line feed after the single line. Also add a line like ' test.example.org:12345 ' (including extra space)
      4. Save changes.
      5. In the dataroot directory, find the file muc/config.php. Search for 'Test' and look for the servers array.

      EXPECTED: The servers array should have a single entry 0 => 0 => 'test.example.org'.

      BEFORE FIX: The array has two entries, one of which is test.example.org but surrounded by spaces and with a carriage return after it, and the other is an empty string.

      Repeat with Memcached

      Show
      NOTE: Test requires access to dataroot directory. 1. Go to cache configuration page (System admin/Plugins/Caching/Configuration). 2. Under 'Installed cache stores', click 'Add instance' in the memcache row 3. For store name, type 'Test'. For servers, type: ' test.example.org ' (with spaces at start and end), then hit return to add a line feed after the single line. Also add a line like ' test.example.org:12345 ' (including extra space) 4. Save changes. 5. In the dataroot directory, find the file muc/config.php. Search for 'Test' and look for the servers array. EXPECTED: The servers array should have a single entry 0 => 0 => 'test.example.org'. BEFORE FIX: The array has two entries, one of which is test.example.org but surrounded by spaces and with a carriage return after it, and the other is an empty string. Repeat with Memcached
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-42839-master

      Description

      The memcache configuration forms are highly sensitive to whitespace. In particular, if you include a blank line at the end of the form, it will result in unexpected behaviour. This is easy to do when copy-pasting lists of servers; we've done this multiple times in live configuration.

      The server lists should have a basic level of tolerance for whitespace.

        Attachments

          Activity

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Frédéric Massart
              Participants:
              Component watchers:
              Matteo Scaramuccia, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13