Skip to content
Snippets Groups Projects
Unverified Commit 546aee7e authored by Amber Brown's avatar Amber Brown Committed by GitHub
Browse files

Merge pull request #3835 from krombel/fix_3821

fix VOIP crashes under Python 3
parents 33716c4a 3572a206
No related branches found
No related tags found
No related merge requests found
fix VOIP crashes under Python 3 (#3821)
......@@ -42,7 +42,11 @@ class VoipRestServlet(ClientV1RestServlet):
expiry = (self.hs.get_clock().time_msec() + userLifetime) / 1000
username = "%d:%s" % (expiry, requester.user.to_string())
mac = hmac.new(turnSecret, msg=username, digestmod=hashlib.sha1)
mac = hmac.new(
turnSecret.encode(),
msg=username.encode(),
digestmod=hashlib.sha1
)
# We need to use standard padded base64 encoding here
# encode_base64 because we need to add the standard padding to get the
# same result as the TURN server.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment