mateclaw/mateclaw-server/src/main/java/vip/mate/workspace/conversation
倪程伟 f70e56cfc3 fix(conversation): exclude malformed conversationIds from admin list/page
conversationId ending in ":" (e.g. webchat:<key8>: with empty visitorId,
from older webchat versions) leaks into the admin console via the
'webchat:%' username LIKE, then 500/403s on open because the trailing ":"
makes some reverse proxies strip the path tail — landing a GET on the
@DeleteMapping variant of /{conversationId} (issue #369).

Add applyMalformedIdGuard — a NOT LIKE '%:' clause — to both listConversations
(lenient + strict overloads) and pageConversations so these rows never
surface. isConversationOwner already rejects unknown ids with 403, so no
change is needed on the direct-access endpoints; once the rows are out of
the lists, admin can no longer reach them.

The two existing strict/non-admin assertions changed from "no LIKE keyword"
to "no webchat:% param value" — applyMalformedIdGuard emits a NOT LIKE
itself, so the LIKE keyword is now present in every query.

Tests cover the guard on lenient, page, and strict paths.
2026-06-19 06:20:59 +08:00
..
config feat(db): introduce Flyway migration framework and unify H2/MySQL schemas 2026-04-11 16:34:09 +08:00
controller fix(conversation): surface webchat visitor sessions in the admin console 2026-06-17 23:21:08 +08:00
event fix(approval): clear in-memory pendingMap on conversation delete via domain event 2026-05-06 16:45:23 +08:00
model feat(webchat): archive flag + revoked-visitor table + view fields (epic #355 PR 1) 2026-06-18 06:33:17 +08:00
repository Initial commit: MateClaw — Java + Vue 3 AI Assistant System 2026-04-04 19:03:49 +08:00
vo feat(webchat): archive flag + revoked-visitor table + view fields (epic #355 PR 1) 2026-06-18 06:33:17 +08:00
ConversationService.java fix(conversation): exclude malformed conversationIds from admin list/page 2026-06-19 06:20:59 +08:00
TokenUsageService.java Initial commit: MateClaw — Java + Vue 3 AI Assistant System 2026-04-04 19:03:49 +08:00