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

$FULLME should not be used for current page

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: General
    • Labels:
    • Testing Instructions:
      Hide

      Regression testing:
      1/ run phpunit lib/tests/weblib_test.php
      2/ test login page redirection - go directly to some page where login is needed, verify it redirects back to the same page after login
      4/ try to click post in forum when logged in as guest, you should be taken back to where you were after logging-in with user account

      Known problems (they existed before, it may behave a bit differently now):
      1/ the sending of current page link to validation service can not work much because we never really know the exact page which may not make sense without current user session anyway
      2/ the quiz grade confirmation when grade item locked in gradebook - it is very problematic to start printing output from low level api, you never really know where you can be and the return to the same page may not make any sense at all especially after POST

      Show
      Regression testing: 1/ run phpunit lib/tests/weblib_test.php 2/ test login page redirection - go directly to some page where login is needed, verify it redirects back to the same page after login 4/ try to click post in forum when logged in as guest, you should be taken back to where you were after logging-in with user account Known problems (they existed before, it may behave a bit differently now): 1/ the sending of current page link to validation service can not work much because we never really know the exact page which may not make sense without current user session anyway 2/ the quiz grade confirmation when grade item locked in gradebook - it is very problematic to start printing output from low level api, you never really know where you can be and the return to the same page may not make any sense at all especially after POST
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w18_MDL-30686_m23_guessurl

      Description

      Since 2.0 the correct way to find out current page url is to use $PAGE->url, unfortunately not all pages set up PAGE->url properly (before require_login) and sometimes we need the current URL very early. Solution is to alter function "qualified_me()" to make it guess the most probable url of the current page using PAGE->url first and then falling back to $FULLME.

      This should fix:
      1/ issues with SSL proxies (FULLME does not contains the https part, new qualified_me() does)
      2/ pages that do correctly set PAGE->url before require_login() - the return to current page after logging-in should be more accurate

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              skodak Petr Skoda
              Integrator:
              Dan Poltawski
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Jun/12