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

Redirect cleaning transforms "language" parameter into "Xlanguage" parameter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 2.0, 2.1, 2.2
    • Fix Version/s: None
    • Component/s: Hub, Libraries
    • Labels:

      Description

      In admin/register.php:

      redirect(new moodle_url($huburl . '/local/hub/siteregistration.php', $params));

      the $params contains a parameter called 'language'. Once redirected, the param become $Xlanguage into the $_REQUEST variable. It is not caused by new moodle_url() but by the redirect() call.

      I checked a bit more and in weblib.php, the following line seems to add a X in front the language parameter:

      $text = preg_replace("~([^a-z])language([[:space:]]*)=~i", "$1Xlanguage=", $text);

      If I removed the last commit: https://github.com/moodle/moodle/commit/581e8dba387f090d89382115fd850d8b44351526#lib/weblib.php , then it works.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: