mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-26 15:26:17 +00:00
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:
1 parent
4195374c23
commit
053d1f9d90
2 files changed
+23
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user