Harden diff path and actor identity parsing by Byron · Pull Request #2215 · gitpython-developers/GitPython
Tasks This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here. refackiew Everything below this line was generated by Codex GPT-5. Created by Codex on behalf of Byron. Byron will review before this is ready to merge. Summary Decode Git C-style quoted diff paths in one pass so escaped literal backslashes cannot be reinterpreted as byte escapes. Parse actor identities with Git-style delimiter scans instead of backtracking regular expressions. Use GitPython's whole-string fallback when an actor delimiter is missing. Advisory summary GHSA-v6xg-m7rh-r365: high severity; GitPython 3.1.59; no patched version or CVE assigned. GHSA-g5vv-9gxw-82hx: high severity; GitPython <= 3.1.59; no patched version or CVE assigned. The implementation and this description are intentionally limited to the input-validation classes and do not reproduce private proof-of-concept details. References Behavior was checked against Git cf5497b14c5a24f10c13f7e0ee85cb95 (quote.c::unquote_c_style, ident.c::split_ident_line, and invalid-committer tests) and the local gix-actor signature parser/tests. Validation Focused quoted-path regression: passed. test/test_diff.py: 24 passed, 1 environment-sensitive existing failure in test_diff_with_staged_file (expected two conflict entries, got zero). test/test_actor.py: 7 passed. TestUtils::test_actor_from_string: passed. Ruff check and format checks: passed. Codex review: clean for both final commit hashes.
Skip to content