A ping count is unbounded, and three surfaces take it from whoever asks #1379
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1379
Loading…
Add table
Add a link
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?
A ping count is a loop bound, and three surfaces take it from whoever asks.
Measured on the current tree (
Simulator.pingwith a router pinging its own address):-5'abc'engine/simulator.jsping()doesopts.count || 4and then loops.POST /api/topologies/:id/pingpassesbody.countstraight through — one unauthenticated request away.web/app.jsdoesparseInt(...) || 4. The field carriesmin=1 max=50, but a browser does not clamp a typedvalue, so
9999is sent and 9999 replies are drawn.Same shape as the port-count ceiling (#1319): a number that bounds work, guarded at one door and not the others.
What must be true instead
count(what was sent) andrequestedCount(what was asked for), so a clamp is visible rather than silent.POST /pingrefuses outside the rule with400 E_BAD_COUNTnaming it; an explicitnullmeans "no count".Also worth fixing while in the parser: a stray word (
ping 10.0.0.1 abc) is silently ignored,at laterevaluatesto
NaNand pings at the wrong instant, and a bareatis dropped.ip name-server 300.1.1.1is accepted:net.isIp()is a shape check, at eight doors #1411converge at <ms>— the formhelpprints — answers "converged" instead of refusing #1726converge at <ms>answers the question it prints (#1726) #1728maxis indexed and dropped, probes are unchangeable, and an IPv6 path has no trace #2360