From f0058d7c7a805656414536b0ea56899462c35ba9 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Wed, 17 Jun 2020 15:53:55 +0100 Subject: [PATCH] Use get_args to get next link --- sydent/http/servlets/emailservlet.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sydent/http/servlets/emailservlet.py b/sydent/http/servlets/emailservlet.py index cf50468d..2abb4eec 100644 --- a/sydent/http/servlets/emailservlet.py +++ b/sydent/http/servlets/emailservlet.py @@ -88,6 +88,8 @@ def __init__(self, syd): self.sydent = syd def render_GET(self, request): + args = get_args(request, ('nextLink',), required=False) + resp = None try: resp = self.do_validate_request(request) @@ -95,8 +97,8 @@ def render_GET(self, request): pass if resp and 'success' in resp and resp['success']: msg = "Verification successful! Please return to your Matrix client to continue." - if 'nextLink' in request.args: - next_link = request.args['nextLink'][0] + if 'nextLink' in args: + next_link = args['nextLink'] if not next_link.startswith("file:///"): request.setResponseCode(302) request.setHeader("Location", next_link)