feat(security): unify token validation for message endpoints

This commit is contained in:
InfinityPacer
2024-10-08 14:32:29 +08:00
parent 284082741e
commit 4f01b82b81
4 changed files with 8 additions and 21 deletions

View File

@@ -171,10 +171,6 @@ class SlackModule(_ModuleBase, _MessageBase[Slack]):
client_config = self.get_config(source)
if not client_config:
return None
# 校验token
token = args.get("token")
if not token or token != settings.API_TOKEN:
return None
try:
msg_json: dict = json.loads(body)
except Exception as err: