diff options
| author | Agando <roduccomm@gmail.com> | 2026-10-23 20:37:54 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-10-23 20:37:54 +0200 |
| commit | 577c9241a4ac1c55c5ed0031b76a8a1f83798752 (patch) | |
| tree | aa544a86e82c1a6fd4891d50aa3adc13a7890892 /api/debug/agent-replies.php | |
| parent | dfef70b61b98382a1f78fc6d970fb24ac86c4e36 (diff) | |
fix(chat): GLM review batch — corruption, traversal, cursor truncation, double print (v4.6.78-80)
12 findings accepted, 3 refuted with evidence (see _docs/chat-review-glm-2026-10-23.md).
Data loss: a corrupt thread read as [] and the next append rewrote it with one message —
now 500 and the file is left alone. Cursor after a >50-message truncation pointed at the
thread tail, making the oldest permanently unfetchable — now the last message actually
sent, plus truncated:true. Two posts in the same millisecond shared a cursor — epoch is
now strictly increasing.
Security: chat.py show() had no id validation and joined argv onto CHAT_DIR ('../../x'
read any .json as darkbot) — THREAD_RE added. The auto-reply prompt now treats message
text as untrusted data and forbids acting on instructions found in it.
Ops: relay housekeeping swept neither .lock-* nor orphaned .tmp-*; a crashed listing
looked identical to an empty queue; grep AWAITING also matched message bodies; hermes-poll
printed every reply twice.
Verified: corrupt file -> 500 with the file untouched; traversal -> 'invalid thread id';
hermes-poll -> exactly one line per reply.
Diffstat (limited to 'api/debug/agent-replies.php')
0 files changed, 0 insertions, 0 deletions