Unsigned PDF blocked as DocMDP P=1 because of an unreferenced signature object
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
Hướng nghiên cứu
Start with DocMdpHandler, which the issue identifies as scanning the raw PDF, and trace how it decides whether a DocMDP certification is active. Use the attached synthetic reproducer to compare the unused /P 1 object with the explicitly referenced negative control. Done means unused objects no longer block signing while genuine active P1 certifications still do; the issue author says regression tests are prepared.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
LibreSign refuses to sign an unsigned PDF if it contains an unused signature dictionary with a DocMDP /P 1 entry, even though that object is not referenced by the document's active structure. It returns HTTP 422 with “This document has been certified with no changes allowed. You cannot add more signers to this document.” I originally reproduced this on 13.4.5 and still get the same error after upgrading to 13.4.7.
To reproduce
When trying to sign a PDF that was previously signed outside LibreSign, I got the error below.
I reproduced the same issue with simple test PDFs containing no real signatures or contract data.
The attached ZIP contains three reproduction files:
01-unsigned-control.pdf: a plain unsigned PDF.02-unreferenced-docmdp-p1.pdf: the same document with an unused signature dictionary containing DocMDP/P 1.03-rewritten-control.pdf: a rewritten copy of 02 with the unused object removed.
For each file:
- Upload it to LibreSign.
- Create a signing request.
- Open the request as the signer.
- Confirm signing.
I used two Nextcloud accounts that I control, one requesting the signature and the other signing.
Results from my tests on LibreSign 13.4.5:
| File | Result |
|---|---|
| 01: unsigned baseline | Signed successfully |
| 02: unused DocMDP P1 object | Blocked with HTTP 422 and the certification error |
| 03: rewritten control | Signed successfully |
After upgrading to 13.4.7, the same signing error still occurs. The detailed three-file results above are from the original 13.4.5 tests.
The ZIP also contains a fourth PDF with an explicitly referenced P1 dictionary. That is a separate structural negative control with dummy signature bytes, not part of the three browser signing tests.
Expected behavior
All three unsigned reproduction PDFs should pass the existing-certification check because none contains an active certification signature. An unused DocMDP object should not prevent signing. Genuine active P1 certifications should continue to block additional signatures.
Screenshots
Operational System
Server: Debian, Nextcloud running in Docker
Browser Type and Version
Google Chrome / Edge
Libresign Version
13.4.7; originally reproduced on 13.4.5.
Nextcloud Server Version
33.0.10.1
Logs from Nextcloud Server
No LibreSign exception explaining the rejection.
The signing request returned HTTP 422 with the explicit DocMDP error in its JSON response, included below.
Logs from Developers tools
The failing request is:
POST /ocs/v2.php/apps/libresign/api/v1/sign/uuid/<test-request-uuid>?async=true
HTTP status: 422 Unprocessable Content
Response:
{
"ocs": {
"meta": {
"status": "failure",
"statuscode": 422,
"message": ""
},
"data": {
"action": 2000,
"errors": [
{
"message": "This document has been certified with no changes allowed. You cannot add more signers to this document.",
"code": 422
}
]
}
}
}
Additional context
The failing test PDF has no AcroForm, signature fields, or catalog reference to a certification. It only contains an unused signature object with /P 1.
DocMdpHandler seems to scan the raw PDF and pick up that unused object anyway.
I have a possible fix and regression tests prepared and can submit a PR
- Ngôn ngữ chính
- PHP
- Star
- 838
- Fork
- 171
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 414
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của LibreSign/libresign
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
LibreSign/libresign#9007 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Define LibreSign Behat taxonomy and reusable context conventionsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbackend enhancement php
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
LibreSign/libresign#8284 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remember the visible signature of signers identified by email (no account)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
LibreSign/libresign#9249 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend php
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 53/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của LibreSign/libresign
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
vimeo/psalm#12957 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
roundcube/roundcubemail#10382 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
🐞 Confirmed Bug 🖌️ UI/UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
coollabsio/coolify#12410 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The "Acknowledgement expired" label and "expired on %s" reason on an ack_clear event are wrongĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Icinga/icingadb-web#1454 ·
Maintainer thường phản hồi trong vòng 1 ngày