Skip to content

fix: read QQ Music login plist outside the sandbox container - #12

Merged
fjd2004711 merged 1 commit into
mary20050520:devfrom
TL-Yao:fix/macos-non-sandbox-login-plist
Oct 28, 2026
Merged

fjd2004711 merged 1 commit into
mary20050520:devfrom
TL-Yao:fix/macos-non-sandbox-login-plist

Conversation

@TL-Yao

@TL-Yao TL-Yao commented Oct 28, 2026

Copy link
Copy Markdown

Summary

QQ Music for Mac 11.x (tested on 11.10.5) is no longer sandboxed. It writes its preferences, including AutoLoginUserInfo, to ~/Library/Preferences/com.tencent.QQMusicMac.plist. QM Unlock only looked in the old sandbox container (~/Library/Containers/com.tencent.QQMusicMac/Data/Library/Preferences/...), so a logged-in user got qqmusic_not_found.

This change:

  • checks both the sandbox container path (older clients) and ~/Library/Preferences (11.x). This follows the candidate-path approach qq_library::database_path already uses.
  • picks the most recently modified file when both exist, so stale container data left over from an upgrade doesn't take precedence.
  • when neither is readable, reports a permission error ahead of not-found, so the Full Disk Access prompt still shows for sandboxed installs.
  • applies the same fallback to the Python prototype (qmunlock/credentials.py).

Verification

Platform: macOS 27.2 (arm64), QQ Music 11.10.5

  • npm run build
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path src-tauri/Cargo.toml: added tests for fallback, newest-file selection and not-found reporting
  • python3 -m pytest tests/ -q
  • Manual: credentials::status() now returns ready; before the change it returned qqmusic_not_found. Built the .app locally and decrypted a real .mflac end to end into valid FLAC.

Privacy check

  • This change does not include authst, ekey, account details, real downloaded media, or local capture logs.

QQ Music for Mac 11.x is no longer sandboxed and stores its preferences
in ~/Library/Preferences instead of the app container, so credential
detection reported qqmusic_not_found. Check both locations and prefer
the most recently modified file when both exist.
@fjd2004711
fjd2004711 changed the base branch from master to dev October 28, 2026 12:09
@fjd2004711
fjd2004711 merged commit f46e5a3 into mary20050520:dev Oct 28, 2026
2 checks passed
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