summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-07-06 11:04:44 +0100
committerErik Johnston <erik@matrix.org>2016-07-06 11:05:16 +0100
commit0da24cac8bde47961396f7da774d8dc8ed847107 (patch)
treeab221a2b9b3a30c00c8a521c711bd6722c842e3b /scripts
parentRemove spurious txn (diff)
downloadsynapse-0da24cac8bde47961396f7da774d8dc8ed847107.tar.xz
Add null separator to hmac
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/register_new_matrix_user2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/register_new_matrix_user b/scripts/register_new_matrix_user
index 987bf32d1c..12ed20d623 100755
--- a/scripts/register_new_matrix_user
+++ b/scripts/register_new_matrix_user
@@ -32,7 +32,9 @@ def request_registration(user, password, server_location, shared_secret, admin=F
     )
 
     mac.update(user)
+    mac.update("\x00")
     mac.update(password)
+    mac.update("\x00")
     mac.update("admin" if admin else "notadmin")
 
     mac = mac.hexdigest()