Apply redactToHost to the 403 scope-hint URL so a userinfo-bearing madtea.url can't echo credentials #275
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#275
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?
The 403 "required scope" error hint interpolates
baseURL + "/user/settings/applications"(internal/gitea/client_errors.go:248), andbaseURLiscfg.URLverbatim (client.go:117), never stripped of userinfo. If a user hand-configuresmadtea.url = https://user:token@host, that userinfo prints into the 403 string.Severity: low. It is self-inflicted (the operator's own token echoed back to the operator) and is NOT reachable from origin-derived URLs -
OriginForgeURLrebuildshttps://<host>viaParseRemoteHostand drops userinfo. Flagged only for symmetry:redactToHostis already applied on the redirect-error path but this hint interpolatesbaseURLraw.Fix: wrap the interpolated URL in
redactToHost(baseURL)here, matching the redirect path.Acceptance: the 403 hint prints scheme://host only; a test with a userinfo-bearing configured URL asserts no credentials appear.