Page MenuHomePhabricator

Ensure sensitive data are removed when Windows app is uninstalled
ClosedPublic

Authored by marcin on Aug 6 2024, 1:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 3:10 AM
Unknown Object (File)
Sat, Nov 2, 3:10 AM
Unknown Object (File)
Sat, Nov 2, 3:09 AM
Unknown Object (File)
Sat, Nov 2, 3:09 AM
Unknown Object (File)
Sat, Nov 2, 2:56 AM
Unknown Object (File)
Fri, Oct 18, 5:17 PM
Unknown Object (File)
Fri, Oct 18, 5:17 PM
Unknown Object (File)
Fri, Oct 18, 5:17 PM
Subscribers
None

Details

Summary

This differential ensures that Comm Windows application data are deleted after uninstalling the app.

Test Plan
  1. Build Windows app.
  2. Uninstall it.
  3. Ensure AppData/Roaming/Comm folder is empty. Without this diff it would have all the data.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

marcin added inline comments.
desktop/flow-typed/npm/electron_v22.0.0.js
15–32 ↗(On Diff #43194)

Options are listed in the docs

426–430 ↗(On Diff #43194)

This module is documented here. Proceeded with unexact type to get the diff faster.

desktop/src/handle-squirrel-event.js
25 ↗(On Diff #43194)

In src/main.js we call this at the very beginning of run method. It makes app store data under AppData/Roaming/Comm path. But in this script app.getPath method would return AppData/Roaming/desktop since that is how we name our app in package.json. Therefore I call app.setName('Comm') to get the right path from app.getPath().

Some context here

41–46 ↗(On Diff #43194)

This will be Windows-style error message dialogue window that the user will see if folder deletion will fail. That is why @ashoat is a blocking reviewer.

marcin requested review of this revision.Aug 6 2024, 2:04 PM

Thanks for making this so easy to review!!

This revision is now accepted and ready to land.Aug 6 2024, 2:15 PM