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

auth_ldap should use get_cache_flag() instead of get_cache_flags()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.5
    • Component/s: Authentication, Performance
    • Labels:
    • Testing Instructions:
      Hide

      I'm not really sure how you should test this other than make sure it doesn't break anything. The whole goal is to be able to log in and it should be putting entries into the database and using them as needed.

      1. Hack ntlmsso_finish() and put a 120 secs sleep there, just at the beginning of it.
      2. Enable NTLM SSO http://docs.moodle.org/en/NTLM_authentication
      3. Check the cache_flags table for current entries
      4. Login with LDAP
      5. Before the sleep (120 seconds) expires:
        1. Check the cache_flags table for current entries (should be a new one with your session ID)
      6. Once the sleep (120 seconds) has expired:
        1. Check you are effectively SSO logged in.
        2. Check the cache_flags table for current entries (the new one with the session ID is not there anymore)
      Show
      I'm not really sure how you should test this other than make sure it doesn't break anything. The whole goal is to be able to log in and it should be putting entries into the database and using them as needed. Hack ntlmsso_finish() and put a 120 secs sleep there, just at the beginning of it. Enable NTLM SSO http://docs.moodle.org/en/NTLM_authentication Check the cache_flags table for current entries Login with LDAP Before the sleep (120 seconds) expires: Check the cache_flags table for current entries (should be a new one with your session ID) Once the sleep (120 seconds) has expired: Check you are effectively SSO logged in. Check the cache_flags table for current entries (the new one with the session ID is not there anymore)
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      get_cache_flag() uses the name argument to take full advantage of the cache_flags index on flagtype,name. Instead auth_ldap currently uses get_cache_flags() picks out the one name it actually wanted in the first place and tosses away the rest of the result.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jrchamp Jonathan Champ
                Reporter:
                jrchamp Jonathan Champ
                Peer reviewer:
                Mark Nelson
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Ryan Wyllie, Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  17/May/18