fix(server): refuse an MCP token equal to a sync token

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Opus 5.5 committed 2026-10-26 16:22:14 +01:00
1 parent 4195374c23
commit 053d1f9d90
2 files changed
+23

No files matched your search

+5
View File
@@ -93,6 +93,11 @@ impl Config {
{
return Err("SYNAPSE_MCP_TOKEN has no token".into());
}
if let Some(m) = &self.mcp
&& m.tokens.iter().any(|t| self.auth_tokens.contains(t))
{
return Err("SYNAPSE_MCP_TOKEN must differ from the sync tokens".into());
}
let mcp_tokens = self.mcp.iter().flat_map(|m| m.tokens.iter());
for t in self
.auth_tokens