mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-27 12:18:14 +00:00
Extract the log-injection sanitizer from routers/threads.py into a shared utils module and rename to sanitize_log_param (public API). Eliminates the reverse service → router import in services.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7 lines
231 B
Python
7 lines
231 B
Python
"""Shared utility helpers for the Gateway layer."""
|
|
|
|
|
|
def sanitize_log_param(value: str) -> str:
|
|
"""Strip control characters to prevent log injection."""
|
|
return value.replace("\n", "").replace("\r", "").replace("\x00", "")
|