mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-17 15:47:14 +00:00
feat(clients): show short HWID fingerprint in admin device list (#6464)
* feat(clients): show short HWID fingerprint in admin device list Expose a 12-char prefix of the stored hwid_hash in the admin HWID list API and UI so admins can distinguish devices without querying the database. Full hashes and raw HWIDs remain unexposed. Fixes #6359 * ci: retrigger release matrix after 386 dependency download flake --------- Co-authored-by: mrchatam <mrchatam@users.noreply.github.com> Co-authored-by: mrchatam <287639636+mrchatam@users.noreply.github.com>
This commit is contained in:
@@ -121,8 +121,15 @@ func TestClientHwidGateRegistersAndBlocks(t *testing.T) {
|
||||
}
|
||||
foundUpdated := false
|
||||
for _, row := range list {
|
||||
if len(row.Fingerprint) != hwidFingerprintLength {
|
||||
t.Fatalf("fingerprint length = %d, want %d: %q", len(row.Fingerprint), hwidFingerprintLength, row.Fingerprint)
|
||||
}
|
||||
if row.DeviceModel == "updated-model" && row.UserAgent == "Karing/2.0" && row.DeviceOS == "ios" && row.OsVersion == "18" {
|
||||
foundUpdated = true
|
||||
want := hashHwid(firstRaw)[:hwidFingerprintLength]
|
||||
if row.Fingerprint != want {
|
||||
t.Fatalf("fingerprint = %q, want %q", row.Fingerprint, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
if !foundUpdated {
|
||||
|
||||
Reference in New Issue
Block a user