Skip to content

Commit 0dd6536

Browse files
llancxuwei-fit2cloud
authored andcommitted
fix: add missing comma in whitelist.py causing /mcp* routes to be unwhitelisted
"*.css.map" was missing a trailing comma, causing Python's implicit string literal concatenation to merge it with the next entry into "*.css.map/mcp*". This made the /mcp* whitelist rule never match, so all /mcp/* endpoints (mcp_start, mcp_question, mcp_get_sql, mcp_execute_sql, etc.) were blocked by TokenMiddleware with "Miss Token[X-SQLBOT-TOKEN]" even though they are intended to handle their own authentication internally.
1 parent d6f4e6b commit 0dd6536

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/common/utils/whitelist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"*.ttf",
2222
"*.eot",
2323
"*.otf",
24-
"*.css.map"
24+
"*.css.map",
2525
"/mcp*",
2626
"/system/license",
2727
"/system/config/key",
@@ -90,4 +90,4 @@ def add_path(self, path: str) -> None:
9090
if "*" in path:
9191
self._compile_patterns()
9292

93-
whiteUtils = WhitelistChecker()
93+
whiteUtils = WhitelistChecker()

0 commit comments

Comments
 (0)