Commit 581f78a
- Replace predictable time.time() with secrets.token_hex(16) in create_message
- Apply same fix to _handle_get_state for state messages
- Prevents message ID prediction and replay attacks
- Supersedes PR #3997 (clean re-submission)
Co-authored-by: BossChaos <bosschaos@users.noreply.github.com>
Co-authored-by: AutoJanitor <121303252+Scottcjn@users.noreply.github.com>
1 parent e308a1a commit 581f78a
2 files changed
Lines changed: 46 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
| 503 | + | |
503 | 504 | | |
504 | | - | |
| 505 | + | |
| 506 | + | |
505 | 507 | | |
506 | 508 | | |
507 | 509 | | |
| |||
937 | 939 | | |
938 | 940 | | |
939 | 941 | | |
| 942 | + | |
| 943 | + | |
940 | 944 | | |
941 | | - | |
| 945 | + | |
942 | 946 | | |
943 | 947 | | |
944 | 948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments