Commit bc24f81
🔒 [security] Replace insecure random with secrets for hardware ID
The hardware ID generation was using the insecure `random` module, which is not suitable for generating secure identifiers. This commit replaces it with the cryptographically secure `secrets` module while maintaining the exact output format (prefix "V" + 32 uppercase hexadecimal characters).
🎯 **What:** The vulnerability fixed is the use of insecure randomness (via `random.randbytes`) for generating hardware IDs.
1 parent c311b04 commit bc24f81
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
0 commit comments