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
Make Option to Strip Location from Errors sent to Clients #384
Whenever a failure reason is sent, there will be a Location value attached which might reveal some of the internal functionality. It may be a unwanted behavior and potentially dangerous.
@lamgea Thank You for your comment and concern. – In general I believe we think that this information is not so sensitive. (edit: of course, we could be shown to be wrong).
I believe for administrators, and developers, that this information provides a grater benefit than risk: Since we are an open source AGPL project, so the source code should be shared in-any-case with the end users.
I will keep this issue open, as it is possible that we could create an override that strips the extra info from error messages to comfort the extra careful administrators.
Thank for your reply, and it does makes sense. Tracker maintainers can really benefit from this kind of messages if anything really goes wrong. But it will also be nice if we have a option to turn it off.
changed the title [-]The `Location` of errors are included in the `failure reason` returned to the client[/-][+]Make Option to Strip Location from Errors sent to Clients[/+]on Sep 10, 2023
This issue is now the last sub-issue of EPIC #2912 (Remove source locations from errors).
The audit in #2804 showed that the recorded location is wrong at every production site and that #[track_caller] cannot fix it, so instead of adding an option to strip it, the EPIC removes source locations from errors entirely (#2913 to #2918). This issue keeps its title and covers the client-side check: a baseline reproduction on a running tracker now, and a recheck after #2913 to #2918 are merged showing that no HTTP, UDP or REST reply holds a source path. It closes after that recheck.
Outcome: instead of an option to strip the location, the tracker no longer records one. EPIC #2912 removed source locations from the error types, so no reply to a client carries a source path and there is nothing left to strip or configure.
What changed: the decision is recorded in the ADR "errors do not record source locations" and the work is in EPIC #2912 (sub-issues #2913 to #2918). torrust-located-error is gone from the workspace, and a repository check (source-location-check, CI job "Source Locations") rejects Location::caller(), #[track_caller] and torrust_located_error in non-test code.
Verification on running trackers (PR #3028): I sent the same 24 error requests to a tracker built before the removal and to one built after it, over the HTTP tracker, the UDP tracker and the REST API, with a listed and a private tracker. 13 replies held a source path before (for example packages/tracker-core/src/whitelist/authorization.rs:61:23, and for a short info_hash a path inside ~/.cargo/registry). After the removal none does, and each reply still says what failed. The captured replies are in evidence/ and manual-verification-evidence.md.
Server logs are out of scope: tracing events may still name the file and line of the log call. Thank you for the report. This issue will close with the pull request that archives its specification.
Activity
da2ce7 commentedon Aug 26, 2023
@lamgea Thank You for your comment and concern. – In general I believe we think that this information is not so sensitive. (edit: of course, we could be shown to be wrong).
I believe for administrators, and developers, that this information provides a grater benefit than risk: Since we are an open source AGPL project, so the source code should be shared in-any-case with the end users.
I will keep this issue open, as it is possible that we could create an override that strips the extra info from error messages to comfort the extra careful administrators.
lamgea commentedon Aug 27, 2023
Thank for your reply, and it does makes sense. Tracker maintainers can really benefit from this kind of messages if anything really goes wrong. But it will also be nice if we have a option to turn it off.
[-]The `Location` of errors are included in the `failure reason` returned to the client[/-][+]Make Option to Strip Location from Errors sent to Clients[/+]docs(issues): draft the EPIC to remove source locations from errors
Merge #2836: docs(issues): draft the EPIC to remove source locations …
josecelano-bot commentedon Nov 17, 2026
This issue is now the last sub-issue of EPIC #2912 (Remove source locations from errors).
The audit in #2804 showed that the recorded location is wrong at every production site and that
#[track_caller]cannot fix it, so instead of adding an option to strip it, the EPIC removes source locations from errors entirely (#2913 to #2918). This issue keeps its title and covers the client-side check: a baseline reproduction on a running tracker now, and a recheck after #2913 to #2918 are merged showing that no HTTP, UDP or REST reply holds a source path. It closes after that recheck.11 remaining items
docs(pr-reviews): [torrust#384] record the replies and resolved threa…
docs(issues): [#384] record the client-reply recheck: no source path …
Merge #3028: docs(issues): [#384] record the client-reply recheck: no…
josecelano-bot commentedon Nov 24, 2026
Outcome: instead of an option to strip the location, the tracker no longer records one. EPIC #2912 removed source locations from the error types, so no reply to a client carries a source path and there is nothing left to strip or configure.
What changed: the decision is recorded in the ADR "errors do not record source locations" and the work is in EPIC #2912 (sub-issues #2913 to #2918).
torrust-located-erroris gone from the workspace, and a repository check (source-location-check, CI job "Source Locations") rejectsLocation::caller(),#[track_caller]andtorrust_located_errorin non-test code.Verification on running trackers (PR #3028): I sent the same 24 error requests to a tracker built before the removal and to one built after it, over the HTTP tracker, the UDP tracker and the REST API, with a listed and a private tracker. 13 replies held a source path before (for example
packages/tracker-core/src/whitelist/authorization.rs:61:23, and for a shortinfo_hasha path inside~/.cargo/registry). After the removal none does, and each reply still says what failed. The captured replies are inevidence/andmanual-verification-evidence.md.Server logs are out of scope:
tracingevents may still name the file and line of the log call. Thank you for the report. This issue will close with the pull request that archives its specification.docs(issues): [torrust#384] link the parent EPIC in open/ from the ar…
docs(pr-reviews): [torrust#384] add the PR 3038 review audit record
docs(pr-reviews): [torrust#384] record the reply of round 1 in the PR…
docs(pr-reviews): [torrust#384] record finding F2 of round 1 in the P…
docs(pr-reviews): [torrust#384] record the reply of finding F2 in the…
chore(issues): [#384] archive the SI-7 spec to docs/issues/closed and…
Merge #3038: chore(issues): [#384] archive the SI-7 spec to docs/issu…