Harden CGI status-line parsing in git_http_backend #254
Reference in New Issue
Block a user
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?
Dimension: SecOps (4 → 5)
_write_cgi_responseinbot_bottle/git_http_backend.py:151doesint(value.split()[0])on theStatus:header returned bygit http-backend. A malformed or empty status line raisesValueError/IndexErrorthat escapes the handler thread.Proposed: guard the parse and fall back to HTTP 500 on a malformed status line instead of letting the exception propagate. Low risk (internal trust boundary) but unguarded.
Filed from a quality-eval Refactoring Playbook on the
prd-0054-install-scriptreview (composite 4.6/5). Medium priority: lift a dimension from 3 → 4/5; not a correctness defect.