mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 03:44:52 -04:00
Tests for user consent resource (#4140)
This commit is contained in:
parent
5a63589e80
commit
efdcbbe46b
5 changed files with 140 additions and 6 deletions
|
@ -227,7 +227,7 @@ class ConsentResource(Resource):
|
|||
key=self._hmac_secret,
|
||||
msg=userid.encode('utf-8'),
|
||||
digestmod=sha256,
|
||||
).hexdigest()
|
||||
).hexdigest().encode('ascii')
|
||||
|
||||
if not compare_digest(want_mac, userhmac):
|
||||
raise SynapseError(http_client.FORBIDDEN, "HMAC incorrect")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue