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

Problem generating mnet cert with long non-latin site name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7.5, 2.8.3
    • 2.7.3, 2.8.1, 2.9
    • MNet
    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • Hide

      First try before applying patch.
      1. Setup mnet using advanced config page.
      2. Set sitename to something longer then 64 byte using 2-byte unicode symbols. Use odd number of spaces or latin symbols in positions less then 64. You can copy/pasetr sitename "ЫЫЫЫЫЫЫ ыыыыыыыыыыыы ыыыыыыыы ыыыыыыыыыыыы ыыыы" for example.
      3. Try regenerate key on page moodle/admin/mnet/index.php. You'll get error.
      Apply patch and check that there is no error.

      Show
      First try before applying patch. 1. Setup mnet using advanced config page. 2. Set sitename to something longer then 64 byte using 2-byte unicode symbols. Use odd number of spaces or latin symbols in positions less then 64. You can copy/pasetr sitename "ЫЫЫЫЫЫЫ ыыыыыыыыыыыы ыыыыыыыы ыыыыыыыыыыыы ыыыы" for example. 3. Try regenerate key on page moodle/admin/mnet/index.php. You'll get error. Apply patch and check that there is no error.

      1. Set sitename to something longer then 64 byte, using 2-byte unicode symbols. You can copy/pasetr sitename "ЫЫЫЫЫЫЫ ыыыыыыыыыыыы ыыыыыыыы ыыыыыыыыыыыы ыыыы" for example.
      2. Regenerate key on page moodle/admin/mnet/index.php. You'l get error.
      The problem is in moodle/mnet/lib.php line 397 (in 2.8.1)
      $dn[$key] = substr($dn[$key], 0, $length);
      should be
      $dn[$key] = core_text::substr($dn[$key], 0, $length);
      using non-multibyte substr in some cases breaks line inslide multibyte character, and this breaks certificate creation procedure.

            vadimon Vadim Dvorovenko
            vadimon Vadim Dvorovenko
            Ankit Agarwal Ankit Agarwal
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.