mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(mcp): refuse panel requests to routes reached through a dot suffix
The server routes a mounted path when a dot follows it, so /mcp.json reached the MCP endpoint while panel_request refused only /mcp and /mcp/...; the same held for the provider-settings, credential and model routes. The refusals now match a dot after the route as well. A regression test drives panel_request against a real Vite server. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
6cdd6c8af9
commit
81513f9aae
5 files changed
+109
-8
No files matched your search
@@ -234,6 +234,12 @@ test('routes the panel never loads are refused in any case or encoding', async (
|
||||
'/api/%4fpenai/hud-summary',
|
||||
'/mcp',
|
||||
'/MCP',
|
||||
// A dot after a mounted route still reaches it.
|
||||
'/mcp.json',
|
||||
'/MCP.json',
|
||||
'/api/setup.json',
|
||||
'/api/realtime.token',
|
||||
'/api/OpenAI.x/hud-summary',
|
||||
'/@fs/etc/passwd',
|
||||
'/@vite/client',
|
||||
'/%40fs/x',
|
||||
|
||||
Reference in new issue
Block a user