Hash MCP session user owner fingerprints

This commit is contained in:
Cursor Agent 2026-05-11 03:52:18 +00:00
parent 33425cbe4b
commit c6a41a57fe
No known key found for this signature in database

View file

@ -2706,7 +2706,10 @@ if MCP_AVAILABLE:
).hexdigest()
return f"key:{api_key_hash}"
if user_api_key_auth.user_id:
return f"user:{user_api_key_auth.user_id}"
user_id_hash = hashlib.sha256(
user_api_key_auth.user_id.encode("utf-8")
).hexdigest()
return f"user:{user_id_hash}"
if oauth2_headers:
authz = oauth2_headers.get("Authorization") or oauth2_headers.get(
"authorization"