[frontend/security] API key prefixes regex-matched in client-side slashCommands.js #793
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus#793
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
static/js/slashCommands.jslines 39-41 contain regex patterns that detect API key formats in user input client-side:The flow (lines 549, 627, 647, 663, 683, 704, 722) sends detected API keys via FormData (
fd.append("api_key", ...)) to the server. The key is visible in browser DevTools, browser history, and any XSS payload on the page.Impact
Recommendation
Fixed in PR #836. API key prefix patterns moved from client-side
PROVIDER_PATTERNSinslashCommands.jsto server-sidePOST /api/detect-key-providerendpoint inmodel_routes.py. Client-sidedetectProvider()now delegates key detection to the server.