-
-
Notifications
You must be signed in to change notification settings - Fork 326
Description
Describe the bug
When switching to a different user (by logging out and logging back in as a new user) it seems that the original user's Pouch telemetry DB (storing the user's un-aggregated telemetry data in the browser) gets re-used as the telemetry DB for the newly logged in user.
I believe the blast radius of this issue is limited to just the telemetry for the current day. The next day after the new user logs in, a fresh telemetry DB should be created for the current user.
(Originally found via @benkags's tests added in #10371.)
To Reproduce
-
On a fresh browser session (nothing cached) login as a user
user-a- Use the browser console to confirm that a telemetry DB is created for
user-a: await window.indexedDB.databases();- You should see an entry like
_pouch_telemetry-2025-11-10-user-a(but with the current date)
- Use the browser console to confirm that a telemetry DB is created for
-
Log out and then login again as a different
user-b- Again use the browser console to check which DBs exist.
- Note that new databases have been created for
user-bexcept that no_pouch_telemetry-2025-11-10-user-bexists. - Telemetry is still being recorded successfully, but it is being stored in
_pouch_telemetry-2025-11-10-user-a
-
Expected behavior
I expected separate telemetry databases to be created for each user.
Additional context
When the Telemetry Service creates a fresh telemetry DB for the user for the day, the current username is part of the DB name. However, when subsequent telemetry entries are written to the DB, the telemetry database to use is resolved only by checking the prefix/format and checking the date value. The telemetry service never actually checks the username part of the telemetry DB name before using it....
I have not confirmed this yet, but I expect this has been a problem since at least 4.5.0 (when we refactored telemetry to use a DB per day).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status