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

Giving a hostwwwroot parameter with trailing slash in auth/mnet/jump.php fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.14, 2.0, 2.1, 2.1.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: MNet
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      Requirements:

      • Moodle - moodle.local
      • Mahara - mahara.local

      Instructions

      Expected Result

      Remote login correctly handled

      Actual Result

      Error:

        This server is not configured for remote login.

      Other Variants

      Try a hostname of 'mahara.local/' or 'mahara.local' for the same effect

      Show
      Requirements: Moodle - moodle.local Mahara - mahara.local Instructions Enable Moodle Networking on Moodle Enable Networking on Mahara Add institution in Mahara, with XMLRPC auth source and settings for Moodle to SSO In. Use a hostname of moodle.local Add Moodle Networking Peer for mahara set to publish identity provider - Use a hostname of http://mahara.local/ Give authenticated users permission to roam Attempt to visit http://moodle.local/auth/mnet/jump.php?hostwwwroot=http://mahara.local/ Expected Result Remote login correctly handled Actual Result Error: This server is not configured for remote login. Other Variants Try a hostname of 'mahara.local/' or 'mahara.local' for the same effect
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-30042-master-1

      Description

      The hostwwwroot parameter in auth/mnet/jump.php is not stripped of the trailing slash.

      In admin/mnet/peers.php (around line 81), the wwwroot parameter has the following done to it:

      • Trimmed of whitespace
      • Trimmed of trailing slashes
      • http:// Added if not starting with http

      I propose that auth/mnet/jump.php also does the same. Especially as the wwwroot that comes from mahara has a trailing slash with it.

        Gliffy Diagrams

          Activity

          Hide
          dobedobedoh Andrew Nicols added a comment -

          I've:

          • verified the issue;
          • applied and tested the commit; and
          • prepared a pull branch against master.
          Show
          dobedobedoh Andrew Nicols added a comment - I've: verified the issue; applied and tested the commit; and prepared a pull branch against master.
          Hide
          phalacee Jason Fowler added a comment -

          Code looks good. Are you able to supply branches for Stable20 and Stable21?

          Show
          phalacee Jason Fowler added a comment - Code looks good. Are you able to supply branches for Stable20 and Stable21?
          Hide
          dobedobedoh Andrew Nicols added a comment -

          These cherry-pick cleanly, but I've also pushed pull branches if that makes things easier

          I've also taken the opportunity to:

          • confirm bug on 2.0
          • verify fix on 2.0
          • confirm bug on 2.1
          • verify fix on 2.1
          Show
          dobedobedoh Andrew Nicols added a comment - These cherry-pick cleanly, but I've also pushed pull branches if that makes things easier I've also taken the opportunity to: confirm bug on 2.0 verify fix on 2.0 confirm bug on 2.1 verify fix on 2.1
          Hide
          phalacee Jason Fowler added a comment -

          code looks great

          Show
          phalacee Jason Fowler added a comment - code looks great
          Hide
          dobedobedoh Andrew Nicols added a comment -

          Can this be put up for integration then?

          Show
          dobedobedoh Andrew Nicols added a comment - Can this be put up for integration then?
          Hide
          salvetore Michael de Raadt added a comment -

          Thanks for working on this, Andrew.

          Pushing it through to integration.

          Show
          salvetore Michael de Raadt added a comment - Thanks for working on this, Andrew. Pushing it through to integration.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          rwijaya Rossiani Wijaya added a comment -

          This is looking great.

          Test passed.

          Show
          rwijaya Rossiani Wijaya added a comment - This is looking great. Test passed.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          And this has landed upstream, just on time for the upcoming new releases week. Thanks for it!

          Ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - And this has landed upstream, just on time for the upcoming new releases week. Thanks for it! Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Nov/11