Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4199cb8
Choose a base ref
...
head repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: aee2fd5
Choose a head ref
  • 12 commits
  • 13 files changed
  • 2 contributors

Commits on Apr 28, 2026

  1. prevent out-of-repo access when manipulating references.

    This previously made it possible to create, modify and delete files outside outside
    of the repository, which is a problem if inputs aren't trusted.
    
    Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
    codex and Byron committed Apr 28, 2026
    Configuration menu
    Copy the full SHA
    25ba54d View commit details
    Browse the repository at this point in the history
  2. address review feedback and CI failures

    Consolidate follow-up fixes from review and CI:
    
    - fix lint and mypy issues in reference log path handling
    - validate remote reference paths before invoking git branch deletion
    - add symlink escape coverage where realpath resolves symlinks
    - ensure temporary test repositories release git resources during cleanup
    
    Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
    codex and Byron committed Apr 28, 2026
    Configuration menu
    Copy the full SHA
    4af8463 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2134 from gitpython-developers/validate-ref-creation

    prevent out-of-repo access when manipulating references.
    Byron authored Apr 28, 2026
    Configuration menu
    Copy the full SHA
    dbfa264 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5a15361 View commit details
    Browse the repository at this point in the history
  5. reject control chars in written values in configuration

    Reject CR, LF, and NUL in GitConfigParser values before writing them
    to git config files (which also is a deviation from Git which escapes them).
    
    GitConfigParser._write() serializes embedded newlines as indented
    continuation lines by replacing "\n" with "\n\t". Git itself skips
    leading whitespace before parsing config tokens, so an injected value
    such as:
    
        foo
        [core]
        hooksPath=/tmp/hooks
    
    is written in a form where the indented "[core]" line is still parsed by
    Git as a real section header. This lets attacker-controlled input passed
    to config_writer().set_value() poison repository config, including
    core.hooksPath, and redirect hook execution for later Git operations.
    
    Fail closed instead of stripping or normalizing these characters. Silent
    normalization can hide unsanitized caller input, and GitPython does not
    currently round-trip Git-style escaped values such as "\n" as embedded
    newlines.
    
    Apply the validation to set_value(), add_value(), and the public set()
    path so callers cannot bypass the safer helper API. Add regression tests
    for the advisory payload and for CR, LF, NUL, and bytes values.
    
    This preserves existing read behavior for config files that already
    contain multiline values while preventing GitPython from writing new
    unsafe values.
    
    Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
    codex and Byron committed Apr 28, 2026
    Configuration menu
    Copy the full SHA
    c417af4 View commit details
    Browse the repository at this point in the history
  6. avoid duplicate validation in set_value

    Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
    codex and Byron committed Apr 28, 2026
    Configuration menu
    Copy the full SHA
    8e24503 View commit details
    Browse the repository at this point in the history
  7. Improve pure Python rev-parse coverage and behavior (#2135)

    Port object-resolving revspec cases inspired by gix-revision into deterministic GitPython tests, without shelling out to Git or Gix at runtime. Refactor rev_parse handling around anchors, navigation, peeling, reflog selectors, path/index lookups, describe-style names, and commit-message searches.
    
    Document observed Git/Gix behavior differences and the GitPython choices made for user-facing compatibility.
    
    Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
    codex and Byron committed Apr 28, 2026
    Configuration menu
    Copy the full SHA
    d7ce6fc View commit details
    Browse the repository at this point in the history
  8. Fix rev-parse CI issues

    codex authored and Byron committed Apr 28, 2026
    Configuration menu
    Copy the full SHA
    bdbdf4b View commit details
    Browse the repository at this point in the history
  9. Merge pull request #2137 from gitpython-developers/fix-config-injection

    reject control chars in written values in configuration
    Byron authored Apr 28, 2026
    Configuration menu
    Copy the full SHA
    b049a13 View commit details
    Browse the repository at this point in the history
  10. Address rev-parse review feedback

    codex authored and Byron committed Apr 28, 2026
    Configuration menu
    Copy the full SHA
    6cf7ac3 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2026

  1. Merge pull request #2136 from gitpython-developers/copilot/create-rep…

    …roducing-test-fix
    
    Improve pure Python rev-parse coverage and behavior
    Byron authored Apr 29, 2026
    Configuration menu
    Copy the full SHA
    1c4ea96 View commit details
    Browse the repository at this point in the history
  2. bump version to 3.1.49

    Byron committed Apr 29, 2026
    Configuration menu
    Copy the full SHA
    aee2fd5 View commit details
    Browse the repository at this point in the history
Loading