Skip to content

Add Linux Firefox cookie path support#19

Open
AlexMikhalev wants to merge 1 commit into
paperfoot:mainfrom
AlexMikhalev:task/linux-firefox-cookie-path
Open

Add Linux Firefox cookie path support#19
AlexMikhalev wants to merge 1 commit into
paperfoot:mainfrom
AlexMikhalev:task/linux-firefox-cookie-path

Conversation

@AlexMikhalev
Copy link
Copy Markdown

Summary

Implements Linux Firefox cookie path support for xmaster config web-login.

Changes Made

  1. Added firefox_profiles_dir() with platform-specific implementations:

    • #[cfg(target_os = "linux")] returns ~/.mozilla/firefox/Profiles/
    • #[cfg(target_os = "macos")] returns ~/Library/Application Support/Firefox/Profiles/
  2. Added find_firefox_profile() helper that searches for profiles ending with .default-release or .default and checks for cookies.sqlite

  3. Simplified extract_firefox() to use the platform-specific path functions

Design Alignment

  • Follows the approved design document: .docs/xmaster-linux-patch-design.md
  • Firefox-only approach (Chrome support deferred per design)
  • Zero breaking changes to existing macOS functionality
  • Uses conditional compilation (#[cfg(target_os = "linux")])

Testing

  • Build verification blocked by pre-existing corrupted cc crate in cargo registry (environment issue, not code issue)
  • rustfmt check passed - code is syntactically valid
  • Manual testing required: xmaster config web-login on Linux with Firefox

Open Issues

  • Build could not be verified due to corrupted cargo cache on development machine
  • Firefox not available in environment to test actual cookie extraction

Implements Phase 3 of xmaster-linux-patch design:

- Add #[cfg(target_os = "linux")] firefox_profiles_dir() returning
  ~/.mozilla/firefox/Profiles/
- Add #[cfg(target_os = "macos")] firefox_profiles_dir() returning
  ~/Library/Application Support/Firefox/Profiles/
- Add find_firefox_profile() helper to search for cookies.sqlite
- Simplify extract_firefox() to use platform-specific path functions

Zero breaking changes to existing macOS functionality.
Firefox-only approach (Chrome support deferred per design).

Refs: xmaster-linux-patch-design.md
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.

1 participant