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

wantsurl fails when you need redirection to https pages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • 1.8.8, 1.9.4
    • Other, Usability
    • None

      In line 168 of login/index.php we have:
      } else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0))

      { $urltogo = $SESSION->wantsurl; /// Because it's an address in this site unset($SESSION->wantsurl); } else { // no wantsurl stored or external - go to homepage $urltogo = $CFG->wwwroot.'/'; unset($SESSION->wantsurl); }

      but wantsurl could be also an https link (https://my.site/login/change_password.php or https://my.site/user/editadvanced.php), but in this case homepage is showed. Here my hack:

      } else if (isset($SESSION->wantsurl) and ((strpos($SESSION->wantsurl, $CFG->wwwroot) === 0) || (strpos($SESSION->wantsurl, $CFG->httpswwwroot) === 0))) { $urltogo = $SESSION->wantsurl; /// Because it's an address in this site unset($SESSION->wantsurl); }

      else

      { // no wantsurl stored or external - go to homepage $urltogo = $CFG->wwwroot.'/'; unset($SESSION->wantsurl); }

            moodle.com Moodle HQ
            fairsayan Domenico Pontari (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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