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

$FULLME should not be used for current page

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3
    • 2.2
    • General
    • MOODLE_22_STABLE
    • MOODLE_23_STABLE
    • w18_MDL-30686_m23_guessurl
    • 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

      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

            skodak Petr Skoda
            skodak Petr Skoda
            Dan Poltawski Dan Poltawski
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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