Repository navigation
fix: Detect password-protected PDFs when docling omits the PDFium reason (release-cpd-0.8.0-patch10) - #2541
Open
mpawlow wants to merge 1 commit into
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Issue - https://github.ibm.com/lakehouse/tracker/issues/99817 Summary - Recovered the password-protected reason from the file bytes when newer docling (docling-parse) no longer reports "Incorrect password". - Restored the user-facing password-protected message in the task failure metadata for both the Langflow and non-Langflow paths.
mpawlow
force-pushed
the
mp/fix/cpd-080-p10/gh-99817-password-protected-pdf-docling
branch
from
October 23, 2026 20:52
0cba68e to
a52be62
Compare
This branch has not been deployed
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.
ℹ️ Issue
ℹ️ Summary
doclingversions.docling-parseno longer reportsIncorrect password.Langflowand non-Langflowingestion paths.🐛 Bug Fixes
Could not load documenterror.docling2.108 pre-opened PDFs withpypdfium2(error:Incorrect password).docling-parsefirst, which reports onlyFailed to load document with key ..../Encryptentry (indirect reference or direct dictionary) indocling_service.py.is_docling_load_failure(),is_encrypted_pdf()andpassword_protected_pdf_error().PASSWORD_PROTECTED_PDF_DETAILconstant, keeping theincorrect passwordsubstring thattask_servicemaps to the user-facing message.doclingfailed to load the file, so owner-password-only PDFs that convert fine are unaffected.DoclingService._get_result_for_content()and routedconvert_bytes()and the upload-and-convert path through it.DoclingServeErrorwith the password-protected detail and logged a warning.LangflowFileServiceto applypassword_protected_pdf_error()to aFAILEDpoll result before raising.♻️ Refactoring
_infer_failure_metadatacomment intask_service.pyto document that the backend now recovers the reason from the file bytes.🧪 Tests
test_docling_service.pyfor:is_encrypted_pdf()(parametrized).password_protected_pdf_error()requiring both a load failure and encryption.convert_bytes()naming a password-protected PDF.convert_file()keeping the originaldoclingerror for an unencrypted PDF.test_langflow_file_service_two_phase.pyfor adoclingload failure on:doclingdetail kept).test_task_service_get_task_status2.pymapping a backend-detected password-protected PDF to the clean failure message.