Skip to content

Commit

Permalink
Remove incorrect comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 9, 2024
1 parent b4da6e5 commit ad3429f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion heisenbridge/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ async def detect_public_endpoint(self):
return str(self.api.base_url)

def mxc_checksum(self, server: str, media_id: str) -> str:
# Add trailing slash to prevent length extension attacks
checksum_raw = hmac.new(self.media_key, f"mxc://{server}/{media_id}/".encode("utf-8"), hashlib.sha256).digest()
return base64.urlsafe_b64encode(checksum_raw[:8]).decode("utf-8").rstrip("=")

Expand Down

0 comments on commit ad3429f

Please sign in to comment.