censor/Censor
1
37
Fork
You've already forked Censor
3

fix: collect garbage when saving document #113

Merged
mahlzahn merged 1 commit from mahlzahn/fix_collect_garbage into main 2026年03月04日 12:58:26 +01:00 AGit

See note at https://pymupdf.readthedocs.io/en/latest/page.html#Page.apply_redactions:

Text contained in a redaction rectangle will be physically removed from the page (assuming Document.save() with a suitable garbage option) and will no longer appear in e.g. text extractions or anywhere else. All redaction annotations will also be removed. Other annotations are unaffected.

I couldn’t find a simple reproducer to test that it is indeed a security issue, thus no test has been added for this change.

See note at https://pymupdf.readthedocs.io/en/latest/page.html#Page.apply_redactions: > Text contained in a redaction rectangle will be physically removed from the page (assuming `Document.save()` with a **suitable garbage** option) and will no longer appear in e.g. text extractions or anywhere else. All redaction annotations will also be removed. Other annotations are unaffected. I couldn’t find a simple reproducer to test that it is indeed a security issue, thus no test has been added for this change.
fix: collect garbage when saving document
All checks were successful
/ build-start (pull_request_target) Successful in 9s
/ release-prepare (pull_request_target) Has been skipped
/ checks (pull_request) Successful in 56s
/ merge-conditions (pull_request) Successful in 7s
/ release-publish (pull_request_target) Has been skipped
e0846b949a
See note at
https://pymupdf.readthedocs.io/en/latest/page.html#Page.apply_redactions:
> Text contained in a redaction rectangle will be physically removed
from the page (assuming `Document.save()` with a **suitable garbage**
option) and will no longer appear in e.g. text extractions or anywhere
else. All redaction annotations will also be removed. Other annotations
are unaffected.
I couldn’t find a simple reproducer to test that it is indeed a security
issue, thus no test has been added for this change.

Note

The build job for e0846b949a finished with status success. Install and run the x86_64 test build with:

curl https://gitlab.gnome.org/mahlzahn/censor-ci/-/jobs/6236929/artifacts/raw/censor-dev.flatpak -o censor-dev.flatpak
flatpak install --user censor-dev.flatpak
flatpak run --user page.codeberg.censor.Censor.Devel
> **Note** > The [build job](https://gitlab.gnome.org/mahlzahn/censor-ci/-/jobs/6236929) for e0846b949a8f0c030515917d2c1aba5280f57733 finished with status **success**. Install and run the x86_64 test build with: > > curl https://gitlab.gnome.org/mahlzahn/censor-ci/-/jobs/6236929/artifacts/raw/censor-dev.flatpak -o censor-dev.flatpak > flatpak install --user censor-dev.flatpak > flatpak run --user page.codeberg.censor.Censor.Devel
mahlzahn added this to the v0.5.0 milestone 2026年03月04日 12:56:23 +01:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
censor/Censor!113
Reference in a new issue
censor/Censor
No description provided.
Delete branch "mahlzahn/fix_collect_garbage"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?