Security review fixes: bounded answers, dead token, declined files, duplicate id, repinned lock #18
No reviewers
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-paperless!18
Loading…
Reference in a new issue
No description provided.
Delete branch "sec2-fixes"
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?
What and why
read_body(1 MiB, 30 s; upload 60 s) insideuntil(deadline_in(...)), the client opened withtotal=,follow_redirects=False(the plugin never follows anextlink or a redirect off the configured host; it only ever asks forpage_size=1). Over-cap, too-slow and redirected answers are aPaperlessError.ConnectionUnusable(secrets not kept), so the connection is switched off once with a readable reason;test()still returns aTestResult; 403 stays an ordinary failure._explainflattens DRF field errors (document: ...), takes list bodies, and folds every branch to one line of at most 120 characters (the 2026-10-16 comment); a 400 on thedocumentfield makesputreturnNone, so the copy ends DECLINED after one upload.(#id)of the message, not the first#digits(a title may hold one). The fake now answers in Paperless's full wording.POSTULO_PUBLIC_URL.ngettextfor the Test result; catalogues re-extracted, nothing translated.42be52048,uv lock --upgrade(pyjwt 2.15.1, urllib3 2.8.0, oauthlib 4.0.0);pip-audit --strictover the export (without the project and withoutpostulo, a git dependency) is clean. CI installs uv with the checksum-pinned installer (both workflows) and has a newauditjob. The repin makes the extraction add seven scaffold catalogues.Tests
65 pass (was 37); ruff check/format,
extract --check,check,guardclean. 22 of the new or changed tests fail with the oldstore.py(stashed).Left open / notes
Nothing left open. Observed in the core, not fixed here: inside one
send_pending()pass, the second copy of a connection that has just been retired is still tried once, because the pass holds the connection object it read earlier; the next pass does not dial it. The test asserts that.Closes #10, #11, #12, #13, #14, #16, #17
🤖 Generated with Claude Code