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

Refreshing a page with an expired session doesn't auto-login as guest.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.8.1
    • Fix Version/s: None
    • Component/s: Usability
    • Testing Instructions:
      Hide

      You need dbsessions turned on, set sessiontimeout to 5 minutes to make testing easier, turn autologinguests on.

      In your test course's settings make sure guest access is turned on.

      You will need a forum with at least one discussion. Make sure that the forum isn't using groups as that can result in guest being locked out..

      As a student go to a forum post, make a note of the time and go do something until at least 6 minutes has passed.

      Refresh the forum post. You should be returned to the post and now be logged in as guest.

      Turn autologinguests off and repeat the test. This time you should be redirected to the login page when you refresh the page once your session has expired.

      Logging in as the student should return you to the forum post.

      Show
      You need dbsessions turned on, set sessiontimeout to 5 minutes to make testing easier, turn autologinguests on. In your test course's settings make sure guest access is turned on. You will need a forum with at least one discussion. Make sure that the forum isn't using groups as that can result in guest being locked out.. As a student go to a forum post, make a note of the time and go do something until at least 6 minutes has passed. Refresh the forum post. You should be returned to the post and now be logged in as guest. Turn autologinguests off and repeat the test. This time you should be redirected to the login page when you refresh the page once your session has expired. Logging in as the student should return you to the forum post.
    • Affected Branches:
      MOODLE_28_STABLE
    • Pull Master Branch:
      MDL-48479_login_guest

      Description

      If you log into moodle.org and go to a URL like https://moodle.org/mod/forum/discuss.php?d=84925 (viewing a forum discussion) and leave the tab open long enough for your session to expire, when you refresh it you are presented with the login page. The message "Your session has timed out. Please login again." is displayed as well as both username, password fields and a "Log in as guest" button.

      However if you open a second tab and paste that URL into the address bar you are automatically logged in as guest.

      This second behaviour is correct. The first tab with the expired session should be automatically logging the user in as guest.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              andyjdavis Andrew Davis
              Integrator:
              David Monllaó
              Participants:
              Component watchers:
              Barbara Ramiro, Bas Brands
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated: