Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14584 META: NTLM problems
  3. MDL-14071

NTLM SSO login doesn't work when the login page is requested via POST from other places

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.5, 2.0
    • Component/s: Authentication
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Right now the loginpage_hook() of the NTLM SSO authentication only redirects the user to the NTLM machinery when the login page is requested via GET, to avoid a loop when processing the login form (if the NTLM SSO failed, and Moodle fell back to the standard login).

      But it seems the login page gets requested via POST from other places as well. For example when we use notice_yesno() to ask for a full user account login (see http://moodle.org/mod/forum/discuss.php?d=93390). So the loginpage_hook() doesn't trigger the NTLM SSO machinery, even if it should. We need to trigger it for GET requests or POST requests coming from other pages (but not self).

      In addition to that, we were not storing the Referer in $SESSION->wantsurl if there was one, so we never returned to the right place in those cases.

      The attached patch fixes both issues, but I'd like some people to review it before commiting it to CVS.

      Saludos. Iñaki.

        Attachments

          Activity

            People

            Assignee:
            iarenaza Iñaki Arenaza
            Reporter:
            iarenaza Iñaki Arenaza
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/May/09