You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This hopefully improves the hardware logging system to improve it so we run into less duplicates (ideally none).
This is untested on MacOS and Linux, so we need to perform adequette testing to ensure it works right.
In addition, this system keeps the old one, so a new variable will have to be established to create ties between old IDs and new IDs.
A few thoughts from a quick skim, no need to act on all of these now:
Wiring it up isn't backward compatible. The new hash is a totally different value than the old one on the same machine, so every existing user looks new to the server - bans, ranked history, etc. get orphaned unless the server learns to map old → new. PR description hints at this ("ties between old IDs and new IDs"), but it's a coordinated client+server migration, not just drop-in.
The new ID is also less stable per user. Concatenating five hardware sources means any one of them changing (disk swap, BIOS reflash, mobo swap) invalidates the whole hash. Today's volume-serial-only ID only churns on reformat.
The failure mode is "everyone collapses to one ID."wmic is removed by default on Windows 11 24H2+, and the Linux sysfs reads (product_uuid, board_serial) need root. When the probes fail you hash an empty string - every affected user gets the same fingerprint. The if not raw_id2 fallback doesn't catch this because the function always returns a string. Suggest using the registry MachineGuid on Windows and falling back to username on Linux when probes return empty.
4–5 io.popen subprocesses per call, at connection time.wmic alone can easily stall 1-3s per invocation. Worth caching the result in a module-local after first compute, and ideally avoiding subprocesses entirely on Windows (registry/FFI), the current FFI volume-serial path is instant.
macOS AppleAHCIDiskDriver query is empty on Apple Silicon (M-series uses NVMe via IONVMeController). The IOPlatformUUID part still works there so it's not fatal - that disk-serial component is just always blank on modern Macs and contributes nothing to the fingerprint.
Nits:
rawraw leaks a global (missing local) - pollutes _G with raw hardware serials. Returning the raw concatenated serials at all feels risky; better to hash inside the function and never let the cleartext escape.
jit.os == "OSX" vs the existing love.system.getOS() == "OS X" — two conventions in the same function.
New functions are space-indented; rest of the file is tabs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This hopefully improves the hardware logging system to improve it so we run into less duplicates (ideally none).
This is untested on MacOS and Linux, so we need to perform adequette testing to ensure it works right.
In addition, this system keeps the old one, so a new variable will have to be established to create ties between old IDs and new IDs.