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: py-pdf/pypdf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.9.2
Choose a base ref
...
head repository: py-pdf/pypdf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6.10.0
Choose a head ref
  • 20 commits
  • 34 files changed
  • 9 contributors

Commits on Mar 24, 2026

  1. Configuration menu
    Copy the full SHA
    23d6683 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2026

  1. ENH: Skip MD5 key derivation for AES-256 encrypted PDFs (#3694)

    For V>=5 PDFs, the encryption key is used directly without
    MD5. MD5 computation in _make_crypt_filter() only runs for V<=4,
    allowing AES-256 encrypted PDFs to be read on FIPS-enabled systems where
    hashlib.md5() is blocked.
    
    RC4 and AES-128 encrypted PDFs will still correctly fail on FIPS
    systems, as their key requires MD5.
    Ygnas authored Mar 25, 2026
    Configuration menu
    Copy the full SHA
    88eb5be View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2026

  1. BUG: Fix stale object cache from non-authoritative object streams (#3698

    )
    
    The batch-parse optimization (added in #3677) caches every object
    found when decompressing an object stream. The guard intended to
    skip overridden objects checked `obj_num in self.xref_objStm`, but
    this passes for any compressed object — not just ones that belong
    to the current stream.
    
    In incrementally-updated PDFs, the same object can appear in
    multiple object streams across revisions (per the PDF 1.7 spec,
    §7.5.6). The xref designates one stream as authoritative.
    Decompressing a stale stream (e.g. to read a co-located AcroForm
    dict) would cache the old version of the object, shadowing the
    current one.
    
    Fix: only cache when `xref_objStm` points the object at the stream
    being decompressed.
    
    Closes #3697.
    
    ---------
    
    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    astahlman and claude authored Mar 26, 2026
    Configuration menu
    Copy the full SHA
    4d8ebce View commit details
    Browse the repository at this point in the history
  2. BUG: Correctly verify AES padding during decryption (#3699)

    Additionally removes the handling for incorrectly padded inputs - these
    files are most likely not valid and it would be unexpected to let them
    pass without further notice.
    stefan6419846 authored Mar 26, 2026
    Configuration menu
    Copy the full SHA
    018a52e View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2026

  1. BUG: Use remove_orphans in compress_identical_objects (#3310)

    PdfWriter.compress_identical_objects ignored remove_orphans. Correct for this.
    
    Also deprecate_with_replacement remove_orphans to remove_unreferenced and remove_identicals to remove_duplicates. This makes the naming more obvious.
    
    Closes #3306.
    
    ---------
    
    Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
    j-t-1 and stefan6419846 authored Mar 27, 2026
    Configuration menu
    Copy the full SHA
    6f10e02 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4b4977e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ee30550 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b00a704 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6121a6b View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2026

  1. DEV: Bump cryptography from 46.0.5 to 46.0.6 (#3706)

    Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.5 to 46.0.6.
    - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
    - [Commits](pyca/cryptography@46.0.5...46.0.6)
    
    ---
    updated-dependencies:
    - dependency-name: cryptography
      dependency-version: 46.0.6
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 29, 2026
    Configuration menu
    Copy the full SHA
    2c791df View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2026

  1. Configuration menu
    Copy the full SHA
    f3f501b View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2026

  1. Fix PdfReadError when xref table contains comments before trailer (#3710

    )
    
    Some PDF producers (e.g. Vectorizer.AI) insert legal PDF comments
    (% to end of line) between the last xref table entry and the
    `trailer` keyword.  The `_read_standard_xref_table` method did not
    skip comments at this position, causing it to misparse the `%`
    character and ultimately raise `PdfReadError: Could not read Boolean
    object`.
    
    The fix adds a loop after reading xref entries that calls
    `skip_over_comment()` to consume any comment lines before checking
    for the `trailer` tag.  This is consistent with PDF spec §7.2.3
    which allows comments anywhere except inside strings or streams.
    rassie authored Apr 7, 2026
    Configuration menu
    Copy the full SHA
    bd95bd8 View commit details
    Browse the repository at this point in the history
  2. DOC: Add AI policy (#3717)

    Some parts of this policy have been derived from https://github.com/astral-sh/.github/blob/main/AI_POLICY.md
    stefan6419846 authored Apr 7, 2026
    Configuration menu
    Copy the full SHA
    e00505e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5456731 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2026

  1. DEV: Bump codecov/codecov-action from 5 to 6 (#3701)

    Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5 to 6.
    - [Release notes](https://github.com/codecov/codecov-action/releases)
    - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
    - [Commits](codecov/codecov-action@v5...v6)
    
    ---
    updated-dependencies:
    - dependency-name: codecov/codecov-action
      dependency-version: '6'
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 8, 2026
    Configuration menu
    Copy the full SHA
    696b978 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2026

  1. Bump cryptography from 46.0.6 to 46.0.7 in /requirements (#3723)

    Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.6 to 46.0.7.
    - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
    - [Commits](pyca/cryptography@46.0.6...46.0.7)
    
    ---
    updated-dependencies:
    - dependency-name: cryptography
      dependency-version: 46.0.7
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 9, 2026
    Configuration menu
    Copy the full SHA
    3155e04 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2026

  1. Configuration menu
    Copy the full SHA
    1e0e5be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0d9de6 View commit details
    Browse the repository at this point in the history
  3. SEC: Disallow custom XML entity declarations for XMP metadata (#3724)

    While *libexpat* already handled the more severe cases, it has still
    been possible to cause rather high memory usage. For this reason,
    disallow entity declarations completely.
    
    I decided against *defusedxml* for now, as I do not see the benefit of
    including an untyped external package for something this small,
    especially considering that the public maintenance status does not look
    very promising.
    stefan6419846 authored Apr 10, 2026
    Configuration menu
    Copy the full SHA
    b15a374 View commit details
    Browse the repository at this point in the history
  4. REL: 6.10.0

    ## What's new
    
    ### Security (SEC)
    - Disallow custom XML entity declarations for XMP metadata (#3724) by @stefan6419846
    
    ### New Features (ENH)
    - Skip MD5 key derivation for AES-256 encrypted PDFs (#3694) by @Ygnas
    
    ### Bug Fixes (BUG)
    - Use remove_orphans in compress_identical_objects (#3310) by @j-t-1
    - Fix PdfReadError when xref table contains comments before trailer (#3710) by @rassie
    - Correctly verify AES padding during decryption (#3699) by @stefan6419846
    - Fix stale object cache from non-authoritative object streams (#3698) by @astahlman
    - Fix extract_links pairing when annotations include non-links (#3687) by @ReinerBRO
    
    ### Documentation (DOC)
    - Add AI policy (#3717) by @stefan6419846
    
    [Full Changelog](6.9.2...6.10.0)
    stefan6419846 committed Apr 10, 2026
    Configuration menu
    Copy the full SHA
    fd0aeca View commit details
    Browse the repository at this point in the history
Loading