mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
Merge bf7c7ecf05 into 05d8f11085
This commit is contained in:
commit
6b1263c565
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ downloading from PR #4588 (YuhangLin).
|
|||
"""
|
||||
|
||||
import asyncio
|
||||
import hmac
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
|
|
@ -773,7 +774,7 @@ class BlueBubblesAdapter(BasePlatformAdapter):
|
|||
or request.headers.get("x-guid")
|
||||
or request.headers.get("x-bluebubbles-guid")
|
||||
)
|
||||
if token != self.password:
|
||||
if not hmac.compare_digest(token or "", self.password or ""):
|
||||
return web.json_response({"error": "unauthorized"}, status=401)
|
||||
try:
|
||||
raw = await request.read()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue