investigate: confirm the path-escaping guard covers every internal/gitea builder after #609 #850
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#850
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?
What happens
#609 set the rule that every value going into an API path or query is escaped, and it added a guard test that fails when a new builder joins a variable into a path without escaping it. #609 is closed. But #711, filed later, found the repo-flags builder still interpolated raw segments with
fmt.Sprintf, so it had slipped past #609's sweep and its guard. #711 is also closed. That one escape raises the exact question #609's guard was meant to settle: does the guard catch every request-path builder, or can another one still slip the way repo-flags did?Why it matters
The original audit listed a raw-path-concat inventory of about 13 builders. #609 states the rest already route through
escapePath, but repo-flags proves at least one slipped. A guard that misses a builder gives false confidence. This is same-origin path reshaping only, so the repo-scope boundary holds and the severity is low, but a guard that does not actually guard is worth confirming. No decision record governs the path-builder escaping itself; it is tracked in #609 and #711, so this investigation changes no ADR.Investigate
internal/giteaand check each escapes its variable segments (throughapiPath,escapePath, orurl.Values).Acceptance criteria
internal/gitearequest-path and query builder is confirmed to escape its variable segments, or the raw one is fixed.Related