Commit cce9da4
fix: reject ClusterRequest format=0 to prevent ServersResponse V0 corruption
ServersResponse.decode_body unconditionally reads a uint64 role field
after each node's address. If a V0-format response (no role field) were
received, the decoder would silently misinterpret subsequent node IDs as
role values, cascading data corruption. ClusterRequest now rejects
format=0 at construction time since ServersResponse only supports V1.
Closes #120
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent be96234 commit cce9da4
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
510 | 516 | | |
511 | 517 | | |
512 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
402 | 404 | | |
403 | 405 | | |
404 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
405 | 412 | | |
406 | 413 | | |
407 | 414 | | |
| |||
0 commit comments