You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tracker_client check panics on a UDP tracker URL without a usable address #2984
tracker_client check rejects a UDP tracker URL that has no host or no port as a usage/configuration error (exit 2, one JSON error record), and never panics on a UDP tracker address it cannot resolve.
Problem
Configuration validation only checks that each udp_trackers entry parses as a URL. The UDP check then calls url.socket_addrs(|| None).unwrap() in console/tracker-client/src/console/clients/checker/checks/udp.rs (resolve_socket_addr), which fails for a URL without a port, so the program panics. Reproduce on current develop (stdout must be a pipe):
Result: one JSON panic record, then a runtime_failure record on stderr, exit 1, empty stdout. The same panic happens for udp:/// (no host), http://127.0.0.1 and ftp://127.0.0.1:6969 (a udp:// prefix is added in front, so there is no port), and udp://nonexistent.invalid:6969 (DNS failure). URLs that fail to parse already give exit 2 with an invalid_configuration record.
Proposed fix
Reject a udp_trackers entry with no host, no port or a non-udp scheme during configuration validation (exit 2, invalid_configuration).
Make resolve_socket_addr fallible, so an unresolvable host becomes a failed check for that tracker instead of a panic.
Regression unit tests at the configuration seam and a like-for-like recheck of the reproduction.
Not part of EPIC #2758; found while fixing #2768 (PR #2956). The specification and the reproduction evidence follow in a spec-only PR.
Activity
docs(issues): [torrust#2984] name the result representation for an un…
docs(issues): [torrust#2984] drop the network-free claim for the unre…
docs(issues): [torrust#2984] state that the scheme check reads the ra…
docs(issues): [torrust#2984] split the manual scenario into reproduct…
docs(issues): [torrust#2984] record the reproduction stderr verbatim
docs(issues): [torrust#2984] identify the build and toolchain of the …
docs(pr-reviews): [torrust#2984] add the PR 2985 review audit
docs(issues): [torrust#2984] say how the scheme is detected and cover…
docs(issues): [torrust#2984] rerun the two control cases and record t…
docs(issues): [torrust#2984] bring the spec progress log and last-upd…
docs(pr-reviews): [torrust#2984] add round 2 findings F9 to F11 to th…
docs(issues): [torrust#2984] record the maintainer decisions on the o…
docs(issues): [torrust#2984] correct the date and source of the recor…
docs(issues): [torrust#2984] carry decision 2 through the goal, plan,…
docs(pr-reviews): [torrust#2984] add round 3 findings F12 to F14 to t…
30 remaining items
docs(issues): [torrust#2984] record the test design reviews of the im…
docs(pr-reviews): [torrust#2984] add the PR 3013 review audit
docs(pr-reviews): [torrust#2984] correct the time stamp of the PR 301…
test(tracker-client): [torrust#2984] resolve real IP literals in the …
docs(pr-reviews): [torrust#2984] add round 2 findings F5 and F6 to th…
fix(tracker-client): [torrust#2984] do not echo the path, query or cr…
docs(pr-reviews): [torrust#2984] add round 3 finding F7 to the PR 301…
fix(tracker-client): [torrust#2984] do not write the path of a UDP tr…
docs(pr-reviews): [torrust#2984] add round 4 finding F8 to the PR 301…
fix(tracker-client): [#2984] reject unusable tracker URLs and fail th…
docs(issues): [#2984] record the red and green evidence and mark the …
Merge torrust#3013: fix(tracker-client): [torrust#2984] reject unusab…
docs(issues): [#2984] archive the closed issue spec
Merge #3030: docs(issues): [#2984] archive the closed issue spec