diff options
author | J. Ryan Stinnett <jryans@gmail.com> | 2019-09-24 13:41:17 +0100 |
---|---|---|
committer | J. Ryan Stinnett <jryans@gmail.com> | 2019-09-24 13:50:32 +0100 |
commit | 53f850caf46f2397189ad716d7cc4eb0c9581529 (patch) | |
tree | c0bd477e44a5dc4dab373b6e5bf09a362c6795d2 | |
parent | Add submit_url response parameter to msisdn /requestToken (#6079) (diff) | |
download | synapse-53f850caf46f2397189ad716d7cc4eb0c9581529.tar.xz |
Add sid to next_link for email validation
-rw-r--r-- | synapse/handlers/identity.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py index 1f16afd14e..adafde004d 100644 --- a/synapse/handlers/identity.py +++ b/synapse/handlers/identity.py @@ -18,6 +18,7 @@ """Utilities for interacting with Identity Servers""" import logging +import urllib from canonicaljson import json @@ -328,6 +329,15 @@ class IdentityHandler(BaseHandler): # Generate a session id session_id = random_string(16) + if next_link: + # Manipulate the next_link to add the sid, because the caller won't get + # it until we send a response, by which time we've sent the mail. + if '?' in next_link: + next_link += '&' + else: + next_link += '?' + next_link += "sid=" + urllib.parse.quote(session_id) + # Generate a new validation token token = random_string(32) |