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

GET request during site registration is too long

XMLWordPrintable

    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • MDL-65187-master
    • Hide

      According to this article you can use IE8 or IE9 to actually reproduce the bug.
      If you DO have such browser, please use it. Otherwise use any browser you have to check for regressions

      1. You need a test site with a public URL (that can be accessed from the outside) and admin access. https://ngrok.com/ is a good solution to open you local site temporarily
      2. If your site is already registered, unregister it (link in the bottom of the registration page)
      3. Fill the registration form with very long site name and description. Use non-latin characters (see example in description), this makes the URL even longer
      4. Register the site, make sure there are no errors
      5. Run scheduled task "Site registration", make sure there are no errors
      Show
      According to this article you can use IE8 or IE9 to actually reproduce the bug. If you DO have such browser, please use it. Otherwise use any browser you have to check for regressions You need a test site with a public URL (that can be accessed from the outside) and admin access. https://ngrok.com/ is a good solution to open you local site temporarily If your site is already registered, unregister it (link in the bottom of the registration page) Fill the registration form with very long site name and description. Use non-latin characters (see example in description), this makes the URL even longer Register the site, make sure there are no errors Run scheduled task "Site registration", make sure there are no errors

      We keep adding more information to the site registration, however initial registration is sent as GET request length may be limited.

      In fact, I have found a registered site with the name:
      АНО "ДПО "Институт повышения квалификации специалистов профессионального образования"; АНО "Санкт-Петербургский научно-исследовательский институт педагогики и психологии высшего образования"; АНО ВО "Санкт-Петербургский педагогический институт"

      see https://moodle.net/sites/index.php?country=RU

      This site would not be able to register if it was happening now because the total query length would be 2107 characters (even without descriptions, alternative emails, etc)
      Also token is appended to the end of request.

      To minimise changes on moodle.net side (processing of initial registration is very complicated), I can recommend the following:

      • send only minimum information in the initial request
      • right after registration is confirmed send a WS request updating registration with full data

      P.S. The actual solution submitted is slightly different:

      • send token as the very first parameter in query string
      • send important/required fields (policyagreed, country, language, subscription emails) first, followed by other fields including name. If the URL is truncated by the browser, we don't loose important information and during the next registration update all fields will be sent properly (update registration task uses POST)

        1. MDL-65187.png
          106 kB
          Jennifer Bauzon

            marina Marina Glancy
            marina Marina Glancy
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Adrian Greeve Adrian Greeve
            Jennifer Bauzon Jennifer Bauzon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 10 minutes
                4h 10m

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