Files
Enterprise-Knowledge-Base/frontend
wizardchen 2c34446425 fix(security): namespace command-palette recent searches per (user, tenant)
Recent searches were persisted under a single global localStorage
key (weknora_cmdk_recent), so:

  - Multiple users sharing the same browser saw each other's
    queries.
  - Switching tenants inside the same session also leaked queries
    across tenants.

Keys are now scoped as 'weknora_cmdk_recent:<userId>:<tenantId>'
with 'anon' / 'none' fallbacks for the pre-login window. A watch
on (user.id, effectiveTenantId) reloads from the right namespace
on login / logout / tenant switch. The auth store is resolved
lazily inside actions / watcher (not at setup-time) to dodge any
pinia init-order surprises — same pattern stores/menu.ts already
uses.

Old global key entries become orphans (~100 bytes); no migration
since that data is the leak we're fixing.
2026-05-18 17:28:58 +08:00
..
2025-08-05 15:08:07 +08:00
2026-05-13 15:04:15 +08:00
2026-05-13 15:04:15 +08:00
2025-08-05 15:08:07 +08:00
2025-08-05 15:08:07 +08:00
2025-08-05 15:08:07 +08:00