fix: parse actor identities without regular expressions · gitpython-developers/GitPython@b6386b8 · GitHub
Skip to content

Commit b6386b8

Browse files
Byroncodex
andcommitted
fix: parse actor identities without regular expressions
<!-- agent --> GHSA-g5vv-9gxw-82hx reports quadratic backtracking when an actor identity contains a long unterminated email delimiter. Add a regression that exercises a 20,000-character malformed identity, then replace both actor regexes with direct delimiter scans following Git's first-opening, first-closing delimiter behavior. Keep GitPython's whole-string fallback when either delimiter is absent. Reference Git baseline cf5497b14c5a24f10c13f7e0ee85cb95 ident.c::split_ident_line and its invalid-committer cases in t/t9300-fast-import.sh. Also reference gix-actor's signature decoder and lenient identity tests. Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>
1 parent 9a92677 commit b6386b8

2 files changed

Lines changed: 28 additions & 16 deletions

File tree

git/util.py

Lines changed: 8 additions & 16 deletions

test/test_actor.py

Lines changed: 20 additions & 0 deletions

0 commit comments

Comments
 (0)