DocHub/backend/app
Tianyang 13789cc0b4 fix: remove duplicate /health route, escape extracted text, validate uploads, handle binary decode
- main.py: remove duplicate /health endpoint definition
- text_extract.py: HTML-escape extracted plain text before indexing so raw
  markup in uploaded documents can't render as live HTML via search snippets
  (stored XSS fix)
- document_service.py: base64-encode content when UTF-8 decoding fails
  instead of raising UnicodeDecodeError (500) on binary files; add upload
  validation for file extension (allowlist) and size (10MB max)
- routers/documents.py: map new validation errors to HTTP 400 with a clear
  detail message instead of letting them 500
- add/extend tests covering escaping, binary get_document, and upload
  validation rejection + acceptance paths
2026-08-01 08:59:34 +08:00
..
routers fix: remove duplicate /health route, escape extracted text, validate uploads, handle binary decode 2026-08-01 08:59:34 +08:00
__init__.py feat: scaffold FastAPI backend with config and health endpoint 2026-08-01 02:15:01 +08:00
config.py feat: scaffold FastAPI backend with config and health endpoint 2026-08-01 02:15:01 +08:00
dependencies.py feat: add documents router for list/get/save/delete/upload 2026-08-01 02:32:42 +08:00
document_service.py fix: remove duplicate /health route, escape extracted text, validate uploads, handle binary decode 2026-08-01 08:59:34 +08:00
main.py fix: remove duplicate /health route, escape extracted text, validate uploads, handle binary decode 2026-08-01 08:59:34 +08:00
minio_client.py feat: add MinioClient wrapper for list/get/put/delete object operations 2026-08-01 02:24:15 +08:00
search_client.py feat: add SearchClient wrapper for index/delete/search operations 2026-08-01 02:25:48 +08:00
text_extract.py fix: remove duplicate /health route, escape extracted text, validate uploads, handle binary decode 2026-08-01 08:59:34 +08:00