diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2016-11-30 16:53:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-30 16:53:20 +0000 |
commit | 321fe5c44c3cdd9c7ac3651657de42aa71f11b29 (patch) | |
tree | b2b6679c398ceec7651ae59027c3f85faeb1e7b7 /synapse/rest | |
parent | Merge pull request #1653 from matrix-org/rav/guest_e2e (diff) | |
parent | Comments (diff) | |
download | synapse-321fe5c44c3cdd9c7ac3651657de42aa71f11b29.tar.xz |
Merge pull request #1656 from matrix-org/rav/remove_time_caveat
Stop putting a time caveat on access tokens
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v1/register.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/synapse/rest/client/v1/register.py b/synapse/rest/client/v1/register.py index b5a76fefac..ecf7e311a9 100644 --- a/synapse/rest/client/v1/register.py +++ b/synapse/rest/client/v1/register.py @@ -384,7 +384,6 @@ class CreateUserRestServlet(ClientV1RestServlet): def __init__(self, hs): super(CreateUserRestServlet, self).__init__(hs) self.store = hs.get_datastore() - self.direct_user_creation_max_duration = hs.config.user_creation_max_duration self.handlers = hs.get_handlers() @defer.inlineCallbacks @@ -418,18 +417,8 @@ class CreateUserRestServlet(ClientV1RestServlet): if "displayname" not in user_json: raise SynapseError(400, "Expected 'displayname' key.") - if "duration_seconds" not in user_json: - raise SynapseError(400, "Expected 'duration_seconds' key.") - localpart = user_json["localpart"].encode("utf-8") displayname = user_json["displayname"].encode("utf-8") - duration_seconds = 0 - try: - duration_seconds = int(user_json["duration_seconds"]) - except ValueError: - raise SynapseError(400, "Failed to parse 'duration_seconds'") - if duration_seconds > self.direct_user_creation_max_duration: - duration_seconds = self.direct_user_creation_max_duration password_hash = user_json["password_hash"].encode("utf-8") \ if user_json.get("password_hash") else None @@ -438,7 +427,6 @@ class CreateUserRestServlet(ClientV1RestServlet): requester=requester, localpart=localpart, displayname=displayname, - duration_in_ms=(duration_seconds * 1000), password_hash=password_hash ) |