Skip to content

Commit c705fe7

Browse files
codexByron
authored andcommitted
fix: block unsafe long-option prefixes (GHSA-2f96-g7mh-g2hx)
1 parent 935b317 commit c705fe7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

git/cmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -967,8 +967,8 @@ def check_unsafe_options(cls, options: List[str], unsafe_options: List[str]) ->
967967
arbitrary commands. These are blocked by default.
968968
"""
969969
# Options can be of the form `foo`, `--foo`, `--foo bar`, or `--foo=bar`.
970-
# We also treat unambiguous long-option prefixes as unsafe, matching
971-
# Git's own option parser behavior for long options.
970+
# We also treat long-option prefix forms as unsafe, matching Git's option
971+
# parser behavior for long options.
972972
canonical_unsafe_options = [
973973
(cls._canonicalize_option_name(option), option) for option in unsafe_options
974974
]

0 commit comments

Comments
 (0)