mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
The webchat conversationId (webchat:<key8>:<visitorId>[:<sessionId>]) and the derived username (webchat:<visitorId>) are written to VARCHAR(64) columns, but visitorId had no validation and sessionId allows 64 chars — so a long visitorId, or a legitimate 64-char sessionId, overflows the column and the getOrCreateConversation INSERT throws (500 on /stream). Validate visitorId (charset + blank->UUID) and fold the variable part into a stable hash when the derived id/username would exceed 64 chars, keeping short ids byte-identical (backward compatible). Also make listSessions filter on exact owner username, not just the conversationId prefix, so system-owned rows can never leak via a crafted visitorId. Adds boundary regression tests. |
||
|---|---|---|
| .. | ||
| src | ||
| Dockerfile | ||
| pom.xml | ||
| settings.xml | ||