fix(memory): fix problems

- Parameterize SKIP/LIMIT in Cypher query instead of f-string interpolation
- Add UUID format validation in validate_end_user_in_workspace before DB query
- Update limit/depth Query descriptions to clarify auto-cap behavior in service layer
- Move uuid import to module level in api_key_utils.py

Modified files:
- api/app/services/memory_explicit_service.py
- api/app/core/api_key_utils.py
- api/app/controllers/service/user_memory_api_controller.py
This commit is contained in:
miao
2026-04-23 16:29:22 +08:00
parent aac89b172f
commit 7ac0eff0b8
3 changed files with 15 additions and 3 deletions

View File

@@ -256,8 +256,10 @@ class MemoryExplicitService(MemoryBaseService):
s.content AS content,
s.created_at AS created_at
ORDER BY s.created_at DESC
SKIP {skip} LIMIT {pagesize}
SKIP $skip LIMIT $limit
"""
params["skip"] = skip
params["limit"] = pagesize
result = await self.neo4j_connector.execute_query(data_query, **params)