Skip to content

Ubisoft API Fixes#255

Merged
mubaraknumann merged 12 commits intostagingfrom
ubisoft-api
Mar 28, 2026
Merged

Ubisoft API Fixes#255
mubaraknumann merged 12 commits intostagingfrom
ubisoft-api

Conversation

@mubaraknumann
Copy link
Copy Markdown
Owner

No description provided.

Mubarak Numann and others added 12 commits March 25, 2026 19:40
…oken validation, and implement exponential backoff for API rate limits.
…pending auth syncs, improved state management via cache snapshots, and artwork fetching optimizations.
… Epic and Microsoft store logout by clearing more local authentication data, and expand cache snapshot robustness.
…ting shortcuts and add source tracking for library sync requests.
… files and binaries for authentication and library parsing, removing the API-based login modal.
…ial sharing

Root cause: read_machine_guid() checked root-level system.reg first, which
all prefixes inherited from the template (same GUID). But Proton creates
pfx/system.reg with a unique MachineGuid per prefix, and that's what Wine
uses for DPAPI encryption. Credentials copied from the auth prefix couldn't
decrypt in game prefixes because their pfx-level MachineGuids differed.

Fix:
- Reverse read_machine_guid() order to check pfx/system.reg first (the one
  Proton actually uses for DPAPI) in all 4 locations: ubisoft_inject_session,
  ubisoft_capture_session, ubisoft_setup, and ubisoft.py
- Add _align_prefix_machine_guid() that patches a game prefix's pfx/system.reg
  to match the auth prefix's MachineGuid before credential injection
- Add align_machine_guid() to ubisoft_setup.py, called after bootstrap with
  wineserver -w to safely modify registry after Wine exits
- Use re.sub() for robust multi-entry MachineGuid replacement
- Fix sync_credentials() return value: return True when source has credentials
  even if target already has identical copies (prevents false 'no credentials')

Tested: All prefixes (.upc-auth, .template, game prefixes) now share the same
pfx-level MachineGuid. ConnectSecureStorage.dat hashes match across prefixes.
inject_session() succeeds with aligned GUIDs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…with improved suffix stripping and fuzzy scoring.
@mubaraknumann mubaraknumann merged commit 1fedb43 into staging Mar 28, 2026
1 check passed
@mubaraknumann mubaraknumann deleted the ubisoft-api branch March 29, 2026 09:53
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