MicroFish/backend/app/utils
Yo-LRK 392a971270 security: gate unexpected-error detail to clients (residual low)
Follow-up to the traceback gate: client-facing exception detail is now gated too.

- safe_error(e) (app/utils/security.py): returns the exception string only when
  FLASK_DEBUG, otherwise a generic message. Full detail stays in server logs.
- All catch-all `except Exception` handlers in api/{graph,report,simulation}.py now
  return safe_error(e) instead of str(e); same for the persisted error fields
  (project.error / state.error / task fail messages). Typed `except ValueError`
  validation handlers (404/400) keep str(e) — those are intentional, actionable
  user messages that echo only user-supplied ids.
- graph_builder no longer puts a full traceback into the task error (logs it
  server-side with exc_info, surfaces safe_error to the client); the batch-failure
  progress message is gated too.
- README documents the CSP connect-src ↔ VITE_API_BASE_URL coupling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 18:23:03 +07:00
..
__init__.py fix(i18n): pass locale to background threads via thread-local storage 2026-04-01 16:55:51 +08:00
file_parser.py refactor: add type hints and FileParser.is_supported() helper 2026-05-23 14:57:46 +08:00
llm_client.py fix: resolve 500 error caused by <think> tags and markdown code fences in content field from reasoning models like MiniMax/GLM 2026-03-06 00:30:31 +08:00
locale.py fix(i18n): validate Accept-Language header against registered locales 2026-04-02 14:20:15 +08:00
logger.py security: address HIGH findings (stored XSS, wildcard CORS, prod log leak) 2026-06-13 17:32:36 +07:00
retry.py Enhance backend functionality with OASIS simulation features 2025-12-01 15:03:44 +08:00
security.py security: gate unexpected-error detail to clients (residual low) 2026-06-13 18:23:03 +07:00
zep_paging.py feat(graph): implement pagination for fetching nodes and edges; add utility functions for streamlined data retrieval 2026-02-27 15:53:29 +08:00