summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-08-18 15:18:50 +0100
committerDaniel Wagner-Hall <daniel@matrix.org>2015-08-18 15:18:50 +0100
commit3e6fdfda002de6971b74aba7805ebdeb2b1b426d (patch)
tree91b64f42a14a2b5766a066005cc4982965b86c4c /synapse
parentMerge branch 'develop' into auth (diff)
downloadsynapse-3e6fdfda002de6971b74aba7805ebdeb2b1b426d.tar.xz
Fix some formatting to use tuples
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/register.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index 86bacdda1d..c391c1bdf5 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -279,11 +279,11 @@ class RegistrationHandler(BaseHandler):
             identifier = "key",
             key = self.hs.config.macaroon_secret_key)
         macaroon.add_first_party_caveat("gen = 1")
-        macaroon.add_first_party_caveat("user_id = %s" % user_id)
+        macaroon.add_first_party_caveat("user_id = %s" % (user_id,))
         macaroon.add_first_party_caveat("type = access")
-        now = self.hs.get_clock().time()
-        expiry = now + 60 * 60
-        macaroon.add_first_party_caveat("time < %s" % expiry)
+        now = self.hs.get_clock().time_msec()
+        expiry = now + (60 * 60 * 1000)
+        macaroon.add_first_party_caveat("time < %d" % (expiry,))
 
         return macaroon.serialize()