mirror of
https://github.com/pvrzz/Portage.git
synced 2026-11-29 05:22:26 +00:00
audit: fix cookie expiry/partition fidelity and profile-safety gaps
- Cookie stream: moz_cookies.expiry is milliseconds, but CDP expects
seconds. The old code imported 52 already-expired cookies in the real
profile and gave every remaining cookie a ~55,000-year expiry; convert
units before comparing/sending, and skip session cookies that cannot
survive the temporary Chromium session.
- Dashboard cookies: request partitionKey:{} for Chrome as well as Firefox
(Chrome also omits CHIPS cookies otherwise), keep hasCrossSiteAncestor,
omit the "unspecified" SameSite attribute for older targets, and never
fall back to an arbitrary cookie store when importing.
- Profile safety: resolve symlinks before cp -a (a symlinked --firefox-profile
was copied as a symlink and Firefox then opened the original profile),
detect Chromium's dangling SingletonLock symlink with lstat, check Firefox's
.parentlock/open descriptors via /proc instead of an optional fuser, refuse
Firefox-looking Chromium targets and root/home, keep the OS password store
for existing Chromium profiles, and clean the sensitive profile clone on
SIGINT/SIGTERM.
- Exporter: never write through a dangling output symlink (O_EXCL|O_NOFOLLOW),
refuse to export while Firefox holds the profile lock, and canonicalise
origins so one odd origin cannot make the importer reject the whole bundle.
- Revert formatting-only manifest changes; align tools/README with the code
(IndexedDB is supported, Node.js 22.12+, lock/symlink/password-store and
key-generator limitations) and add regression tests for all of the above.
This commit is contained in:
@@ -38,7 +38,7 @@ Passwords and autofill data are completely walled off from extension APIs. You w
|
||||
|
||||
## Privacy & Security Model
|
||||
|
||||
* **Zero telemetry:** Everything runs entirely on your local machine. No network requests are ever made.
|
||||
* **Zero telemetry:** Everything runs entirely on your local machine. The extension makes no network requests. The experimental profile helpers in `tools/` also run locally, but they launch a browser and cannot guarantee zero browser background traffic (see the caveat in [tools/README.md](tools/README.md)).
|
||||
* **Memory only:** Portage holds your data in the active page's memory and wipes it completely as soon as you export, import, or close the tab.
|
||||
* **Handle with care:** Your export bundle contains live session cookies. Treat this file exactly like an exported password vault. Keep it local, import it, and delete it immediately.
|
||||
* **No deduplication:** Importing the exact same file twice will duplicate your history and cookies. Just run it once and verify.
|
||||
@@ -66,8 +66,8 @@ Check the releases tab of the repo, or go to the website for Portage at: https:/
|
||||
|
||||
## Experimental: whole-profile Firefox LocalStorage transfer (Linux)
|
||||
|
||||
Optional Python + Node helpers can migrate **all compatible first-party origins**, not just open tabs, to a closed Chrome/Brave profile. Export is encrypted by default; import uses intercepted inert responses rather than contacting websites. See the [step-by-step CLI and privacy limitations](tools/README.md). This does **not** include IndexedDB or guarantee login-session preservation.
|
||||
Optional Python + Node helpers can migrate **all compatible first-party origins**, not just open tabs, to a closed Chrome/Brave profile. Export is encrypted by default; import uses intercepted inert responses rather than contacting websites. See the [step-by-step CLI and privacy limitations](tools/README.md). Login-session preservation is **not guaranteed**: partitioned/container data is skipped and some sites re-authenticate for unrelated reasons. The offline cookie companion skips session and already-expired cookies.
|
||||
|
||||
### Experimental IndexedDB migration
|
||||
|
||||
The Linux companion now also supports **first-party IndexedDB** for Firefox → Chromium. It recreates database schemas, indexes, keys and supported Structured Clone data using Firefox/Chromium browser APIs, without loading live sites. Existing target IndexedDB databases are skipped to prevent accidental overwrites. **Back up both profiles before using `--apply`.** See [tools/README.md](tools/README.md#indexeddb-migration-experimental-firefox--chromebrave) for instructions, compatibility limits and tests.
|
||||
The Linux companion also supports **first-party IndexedDB** for Firefox → Chromium. It recreates database schemas, indexes, keys and supported Structured Clone data using Firefox/Chromium browser APIs, without loading live sites. Existing target IndexedDB databases are skipped to prevent accidental overwrites. **Back up both profiles before using `--apply`.** See [tools/README.md](tools/README.md#indexeddb-migration-experimental-firefox--chromebrave) for instructions, compatibility limits and tests.
|
||||
|
||||
Reference in New Issue
Block a user