ShardBrowser icon indicating copy to clipboard operation
ShardBrowser copied to clipboard

Saving a profile from the editor resets `platform_version` to the preset's value (the OS version a site sees changes after any edit)

Open Nbparts opened this issue 2 months ago • 1 comments

Environment: ShardX Launcher 2.0.3 (engine 152.0.7977.65), macOS arm64 host, GUI.

Repro

  1. New profile, macOS, preset mac-m2-mbp13, create. enrich_new_config randomizes platform_version; browserscan.net reports Mac OS 14.7.
  2. Open the same profile in the editor, change something unrelated (I only switched noise toggles), Save changes.
  3. Start it again: browserscan.net now reports Mac OS 15.6.1. The profile JSON has navigator.platform_version and client_hints.platform_version = 15.6.1, which is the value in the preset file.

Cause

fromStored() never reads the stored navigator.platform_version, so the form field keeps its default "":

https://github.com/ProxyShard/ShardBrowser/blob/4880c3fd1a6360bc205daa5bc5542b16277201c3/src/entities/profile/model/form.ts#L53-L100

toStored() rebuilds the profile from lib.payload and only overrides platform_version when the form field is non-empty ("Empty → inherit donor"):

https://github.com/ProxyShard/ShardBrowser/blob/4880c3fd1a6360bc205daa5bc5542b16277201c3/src/entities/profile/model/form.ts#L126-L143

and save_profile_core enriches new profiles only, so on an edit the donor's value wins and the one randomized at creation is lost.

Impact

Any save from the profile editor on a profile that already holds an account, even one that only changes the name, notes or proxy there, silently changes the OS version reported in navigator.userAgentData / Client Hints, i.e. the device "upgrades" or "downgrades" its OS between two sessions.

Expected

fromStored() carries navigator.platform_version into the form so a save keeps it, the same way hardware_concurrency and device_memory survive an edit.

Nbparts avatar Sep 21 '26 13:09 Nbparts

in 2.1.0

Kr1tos avatar Oct 22 '26 11:10 Kr1tos