Skip to content

2.3.0 snapshot - #2

Open
cdo03c wants to merge 26 commits into
mainfrom
2.3.0-SNAPSHOT
Open

cdo03c wants to merge 26 commits into
mainfrom
2.3.0-SNAPSHOT

Conversation

@cdo03c

@cdo03c cdo03c commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

@ericqLL I decided to update our code base. Let me know what you think!

2.3.0 - 2026-11-06

Added

  • Direct Vector QR Drawing (13.7x Speedup): Bypassed svglib XML parsing by constructing ReportLab Drawing and Rect vector shapes directly from the QR matrix, improving encode throughput by up to 13.7x.
  • Adaptive Two-Tier Resolution: Decoding now uses a fast 150 DPI rendering pass by default, seamlessly falling back to 300 DPI only when scan degradation or high-density codes require higher resolution.
  • Parallel Multi-Page Decoding: Concurrently renders and extracts PDF pages across multi-core systems using ThreadPoolExecutor.
  • Standard I/O Unix Piping: Full support for standard input and output streaming via - across qrdm encode, qrdm decode, and qrdm verify.
  • Machine-Readable CLI Verification: Added --json flag to qrdm verify for automated CI/CD and pipeline integration.
  • Batch PDF Verification: qrdm verify accepts multiple PDF paths, generating structured individual and summary audit reports.
  • Top-Level Convenience API: Exported qrdm.encode, qrdm.decode, and qrdm.verify directly on the root qrdm module namespace.
  • Container Health Probe: Added GET /health endpoint to FastAPI backend for Kubernetes and Docker container liveness/readiness probes.
  • Configurable Upload Ceilings: Added QRDM_MAX_UPLOAD_SIZE setting to FastAPI backend, returning HTTP 413 (Payload Too Large) on oversized uploads.
  • Authenticated Payload Encryption (AES-256-GCM): Optional payload encryption at rest using AES-256-GCM and PBKDF2-HMAC-SHA256 (100,000 iterations) via --passphrase.
  • Decompression Bomb Defense: Enforced streaming decompression limit (max_uncompressed_size) to reject zip-bomb denial-of-service attacks before large buffers are allocated.
  • Path Traversal & Filename Sanitization: Added sanitize_filename utility to neutralize directory traversal (..), forward/backslashes, and unsafe filesystem characters.

Changed

  • Refactored PyMuPDF document lifecycle management using context managers to prevent memory leaks during multi-page batch processing.
  • Cached vector logo assets across multi-page document generation.

cdo03c added 24 commits November 5, 2026 05:28
- Upgrade document integrity hash from 64-bit SHAKE-256 to full 32-byte SHA-256.
- Print full SHA-256 digest in the PDF header for human verification.
- Add structured verification mode (verify_qr_pdf, /verify, and qrdm verify) reporting named check flags without writing files.
- Add minimal-page mode (minimal_mode) showing only filename, hash, and page numbers.
- Add standalone command-line interface (qrdm encode/decode/verify).
- Add strict validation mode rejecting NUL bytes, size overages, and binary signatures.
- Add support for detecting and optionally rejecting foreign/unexplained barcodes.
- Add automated regression tests for degraded scans (rotation, blur, JPEG loss).
- Add security threat model documentation (docs/source/threat_model.md).
- Add offline bundle creation script (scripts/create_offline_bundle.sh).
- Bump version to 2.2.0 in __init__.py, pyproject.toml, and CHANGELOG.md.
…ification

- Add 'photo' and 'flatbed' presets in encode_qr_pdf, CLI, and REST endpoint.
- 'flatbed' preset packs up to 12 codes/page (double capacity) for high-res scanners.
- 'photo' preset produces larger codes with Quartile ECC for mobile phone cameras.
- Drop Python 3.9 (past EOL) and require Python >= 3.10 in pyproject.toml.
- Publish full QRDM format specification (docs/source/format_specification.md).
- Add unit tests for preset encoding, capacity, and decoding.
…ntation

- Update FastAPI pinning from hard-pinned 0.109 to >= 0.115.0 and modernize all dependency versions in pyproject.toml.
- Format all source, tests, and ui code using black and ruff with 0 lint errors.
- Exclude generated protobuf code from ruff and black.
- Update Sphinx documentation for backend endpoints (/verify, presets, minimal_mode), frontend controls, and API references.
- Verify full test suite passes (30/30 passed) and documentation builds cleanly.
…d PyPI publish

- Add ci.yml: runs black formatting, ruff linting, and pytest matrix across Python 3.10, 3.11, and 3.12 with zbar.
- Add release.yml: triggers on merge to main, parses clean release version from SNAPSHOT branch/commit (e.g. 2.2.0), tags v<version>, creates GitHub Release with CHANGELOG notes and distribution assets, builds and deploys latest docs to GitHub Pages (gh-pages), and publishes package to PyPI.
- Add optional AES-256-GCM payload encryption at rest with PBKDF2-HMAC-SHA256
- Add decompression bomb ceiling protection to avoid zip-bomb DoS
- Add path traversal and filename sanitization via sanitize_filename
- Add --passphrase argument to CLI encode, decode, and verify commands
- Add passphrase and filename sanitization to FastAPI REST backend
- Add comprehensive test suite in tests/test_crypto_security.py
- Update format specification, threat model, backend documentation, and CHANGELOG
@cdo03c
cdo03c requested a review from ericqLL November 7, 2026 19:17
@cdo03c cdo03c self-assigned this Nov 7, 2026

This branch has not been deployed

No deployments
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