Skip to content

Remove diskcache - #27

Merged
suchmaske merged 1 commit into
masterfrom
chore/remove-diskcache
Oct 24, 2026
Merged

suchmaske merged 1 commit into
masterfrom
chore/remove-diskcache

Conversation

@suchmaske

@suchmaske suchmaske commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Part 1 of the API security upgrade stack.

Summary

  • Remove diskcache: unmaintained since 2023 (last release 5.6.3) and affected by CVE-2025-69872 (unsafe pickle deserialization) without a fix.
  • Cache() was created without a directory, i.e. a temporary folder per worker process. A plain dict keeps the same behaviour (per worker, no expiry), only in memory.
  • Also dropped from Dockerfile.dev. The lockfile only loses diskcache.

How to test

Setup (gregorovius-env): git -C gregorovius-api switch chore/remove-diskcache, docker compose build gregorovius_api && docker compose up -d gregorovius_api.

  1. curl -w '%{time_total}\n' -o /dev/null http://localhost:8069/letters twice → 200; a repeated call on the same worker returns in ms (2 workers, each with its own cache).
  2. Open https://gregorovius.local/letters/G067797 → letter text and facsimile load.

Test plan

  • poetry run pytest: 21 passed
  • Docker image built; /letters, /persons, /letters/{id} (JSON/XML), /cmif, /beacon/all, /facsimiles return 200
  • Manual smoke test via the frontend

🤖 Generated with Claude Code

diskcache is unmaintained since 2023 and has an unfixed vulnerability
(CVE-2025-69872, unsafe pickle deserialization). Cache() without a
directory used a temporary folder per worker process, so a plain dict
keeps the same behaviour (per worker, no expiry), only in memory.
@suchmaske
suchmaske added this pull request to stack #30 October 24, 2026 11:21
@suchmaske
suchmaske merged commit 40a34fd into master Oct 24, 2026
1 check passed
@suchmaske
suchmaske deleted the chore/remove-diskcache branch October 24, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant