Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-40560

SiteStats allows mutation of cached event registry data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.3, 19.0
    • Fix Version/s: 19.0
    • Component/s: Sitestats
    • Labels:
      None
    • Test Plan:
      Hide
      • As an admin, clear the caches using the Memory tool
      • Log in as instructor
      • Create a new site with very few tools, including Statistics. Do not visit the site.
      • Create a second new site with many tools, including all the tools from the first site. Do not visit the site.
      • Visit the first site, and go to Statistics > Preferences. Note the selected tools and the unselected tools.
      • Visit the second site, and go to Statistics > Preferences. Confirm that more than just the tools from the first site are selected. (Prior to this patch, only tools that were also selected in the first site would be selected).
      Show
      As an admin, clear the caches using the Memory tool Log in as instructor Create a new site with very few tools, including Statistics. Do not visit the site. Create a second new site with many tools, including all the tools from the first site. Do not visit the site. Visit the first site, and go to Statistics > Preferences. Note the selected tools and the unselected tools. Visit the second site, and go to Statistics > Preferences. Confirm that more than just the tools from the first site are selected. (Prior to this patch, only tools that were also selected in the first site would be selected).

      Description

      SiteStats maintains a list of all the events it is aware of, known as the event registry. Individual sites can store their own copies of the registry in their preferences, and choose to ignore certain events, or include certain events that are ignored by default. However, when sites have not yet saved their own copy of the registry, they are given direct access to the cached copy of the master event registry, which is then by default modified to exclude events from tools not in the site.

      This modified registry is then given out to other sites, when those sites really want the master registry instead. As a result, if a site with only a few tools accesses the master registry first, the cached master registry will now be set to ignore any events from tools not in the original site. When a different site needs to use the cached registry, events for tools it has that the original site does not have, would be silently ignored (at the presentation level, events are always counted regardless of display preferences).

      To avoid this problem, a deep copy of the registry can be given out in place of direct access to the cached registry. Sites are then free to modify the copy without their changes making it back into the cached version and affecting other sites.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                plukasew Paul Lukasewych
                Reporter:
                plukasew Paul Lukasewych
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code