Files
Hy-Memory/hy_memory/utils
09e4bc8a30 fix(logging): keep user_id namespaces inside the pipeline log root (#83)
PipelineLogWriter derives its subdirectory from the caller-controlled
user_id prefix before "__". That prefix was joined directly to the log
root, so an absolute prefix or ".." escaped it: user_id="/tmp/evil__u1"
created /tmp/evil and appended the daily log there.

Whitelist a single safe path component and, as defence in depth, verify
the resolved directory stays under the configured root. Sanitize
default_subdir the same way. Add regressions for absolute, parent and
nested prefixes plus a malicious default subdir.

Co-authored-by: qiye.sjh <shijiahao_0802@youzan.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-10-21 11:02:36 +08:00
..
2026-10-16 16:26:27 +08:00
2026-10-16 16:26:27 +08:00
2026-10-16 16:26:27 +08:00
2026-10-16 16:26:27 +08:00
2026-10-16 16:26:27 +08:00
2026-10-16 16:26:27 +08:00
2026-10-16 16:26:27 +08:00
2026-10-16 16:26:27 +08:00