CRITICAL: human input paths accept NaN/Inf and poison the whole economy #120
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the v0.6.0 review (issue #118). Every AI entry point guards non-finite values (finiteAI/aiFault, ruling #91) but none of the human paths do, and strconv.ParseFloat accepts "NaN"/"Inf" with no error:
Fix direction: one finite-checking parse helper for every human numeric entry, plus the deposit-rate clamp to [0, cap].