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

MNet does not support peers with URL longer than 64 characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9.5, 3.0.3
    • 3.0.2
    • MNet
    • Any
    • MOODLE_30_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-52766-master-mnet-url-length
    • Hide

      Ensure URLs are less than 64 characters in length.

      Show
      Ensure URLs are less than 64 characters in length.
    • Hide

      To be able to reproduce and test this, I made the following. You may need to do something similar.

      1. I added a new hostname of my computer into /etc/hosts with the name longer than 64 characters: a123456789.b123456789.c123456789.d123456789.e123456789.f123456789.g123456789h
      2. I added it as a server alias into my Apache vhost configuration: ServerAlias a123456789.b123456789.c123456789.d123456789.e123456789.f123456789.g123456789h
      3. Install Moodle on that hostname and enable MNet networking on it
      4. Install another Moodle and enable MNet networking there too.
      5. Attempt to add the host with the long URL as the MNet peer.
      6. That should be enough as all the further MNet traffic uses the same mechanism. An extra mile can be to make sure that users can really roam.
      Show
      To be able to reproduce and test this, I made the following. You may need to do something similar. I added a new hostname of my computer into /etc/hosts with the name longer than 64 characters: a123456789.b123456789.c123456789.d123456789.e123456789.f123456789.g123456789h I added it as a server alias into my Apache vhost configuration: ServerAlias a123456789.b123456789.c123456789.d123456789.e123456789.f123456789.g123456789h Install Moodle on that hostname and enable MNet networking on it Install another Moodle and enable MNet networking there too. Attempt to add the host with the long URL as the MNet peer. That should be enough as all the further MNet traffic uses the same mechanism. An extra mile can be to make sure that users can really roam.

      PHP file: /admin/mnet/peers.php
      Moodle: 3.0.2
      Build: 20160111

      MNet is enabled. I wanted to add a new peer.

      When adding a peer to:

      Administration -> Site Administration -> Networking -> Manage Peers

      the Hostname entered is truncated after clicking on "Add host".

      Result is that the Public Key for the peer is shown but the URL does not match the URL retrieved, resulting in the error message:

      The key is not a valid SSL key. (4: The subject of the certificate:
      http://xxx-xx-x-x-x.xx-xxxx-x.compute.amazonaws.com/abcdefgh
      does not match the host it came from:
      http://xxx-xx-x-x-x.xx-xxxx-x..compute.amazonaws.com/abcdefghi.
      )

      URL length in use was more than 64 characters long.

      I couldn't tell if the URL from the target peer was being truncated or if the URL entered into the local Moodle was being truncated.

      Changing the URL of the target peer (an MNet hub) to something shorter resulted in the error message not appearing any more.

      I assume that there must be a limit to URL length somewhere in this process.

            mudrd8mz David Mudrák (@mudrd8mz)
            codinghead Stuart Cording
            Andrew Lyons Andrew Lyons
            David Monllaó David Monllaó
            Adrian Greeve Adrian Greeve
            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.