Repository navigation
fix(pdf): honor crypt filter defaults and password byte limits - #1183
Merged
Merged
Conversation
andiwand
marked this pull request as ready for review
October 6, 2026 20:34
andiwand
force-pushed
the
review/modern-statistical-formulas
branch
from
October 6, 2026 20:40
3f97f8e to
a2e7d7e
Compare
V 5 always used AESV3 and ignored /StmF, /StrF and /CF, so the named None filter and Identity did not apply to AES-256 files. V 5 now resolves the filters as V 4 does. If an entry is absent, V 5 keeps AESV3, because AES-256 writers that omit the filters still encrypt everything. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxyTMutqSUJRGfxA8CyzMc
andiwand
force-pushed
the
review/pdf-authentication
branch
from
October 6, 2026 20:46
66525d3 to
bf67e9c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Valid PDFs with named unencrypted crypt filters were rejected because CFM None and its omitted default were not recognized. Accept both according to ISO 32000-1 Table 25. Revision-6 AES-256 authentication also now truncates UTF-8 password bytes to 127 before validation and key recovery, as Algorithm 2.A requires.
Validation: PdfEncryption.* passes all 11 tests. A frozen qpdf 12.3.2 vector verifies user and owner passwords, ignored suffixes, shorter-password rejection, and decrypted content without requiring qpdf at test runtime. Named filter tests cover both explicit and omitted CFM. The earlier integrated stack passed 607 targeted C++ tests and 17 script tests.
Unicode SASLprep password normalization remains a separate compatibility limitation; this patch addresses the byte limit only.