Skip to content

[mob][locker] Fix Locker file opening and offline cache cleanup#10196

Open
AmanRajSinghMourya wants to merge 11 commits intomainfrom
locker-fixes
Open

[mob][locker] Fix Locker file opening and offline cache cleanup#10196
AmanRajSinghMourya wants to merge 11 commits intomainfrom
locker-fixes

Conversation

@AmanRajSinghMourya
Copy link
Copy Markdown
Contributor

Description

Locker was mixing stale file paths with Locker file identity, causing wrong/stale opens, fragile offline behavior, and unsafe cache cleanup.

Fix: Make file opening ID-first, hand off fresh external-open copies, scope cleanup to Locker-owned files, and harden logout/user-details refresh races.
This PR fixes Locker file opening by treating uploadedFileID as the source of truth instead of stale localPath metadata.

Changes included:

  • Ignore stale localPath for synced Locker file opens.
  • Require uploadedFileID for synced-file open flow.
  • Create fresh open_handoff/fileId/timestamp/name copies before opening files externally.
  • Preserve visible filenames/extensions using Locker metadata.
  • Fail closed instead of handing external apps internal cache/decrypted source paths.
  • Keep offline encrypted blobs safe when offline open/decrypt fails.
  • Scope cleanup to:
    • offline encrypted blobs
    • ID-keyed cached encrypted/decrypted files
    • open_handoff
    • Clear Locker-owned offline/cache/handoff files before logout teardown.

Tests

  • Add tests for file opening, handoff behavior, offline storage cleanup, and cache identity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants