From 9a14fd0db36fc1ec817a555f0ec08cd652007c30 Mon Sep 17 00:00:00 2001 From: Pau Rodriguez-Estivill Date: Tue, 25 Jun 2019 19:20:00 +0200 Subject: [PATCH 1/4] Fix JWT login with register Signed-off-by: Pau Rodriguez-Estivill --- synapse/rest/client/v1/login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index 4efb679a042a..ede6bc8b1eae 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -336,7 +336,7 @@ def do_jwt_login(self, login_submission): } else: user_id, access_token = ( - yield self.handlers.registration_handler.register(localpart=user) + yield self.registration_handler.register(localpart=user) ) device_id = login_submission.get("device_id") From 9640c392768df6e3dae30ea63504b1cc66d003ba Mon Sep 17 00:00:00 2001 From: Pau Rodriguez-Estivill Date: Tue, 25 Jun 2019 19:40:16 +0200 Subject: [PATCH 2/4] Add pyjwt conditional dependency Signed-off-by: Pau Rodriguez-Estivill --- synapse/python_dependencies.py | 1 + 1 file changed, 1 insertion(+) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 13698d963837..6324c00ef184 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -95,6 +95,7 @@ "url_preview": ["lxml>=3.5.0"], "test": ["mock>=2.0", "parameterized"], "sentry": ["sentry-sdk>=0.7.2"], + "jwt": ["pyjwt>=1.6.4"], } ALL_OPTIONAL_REQUIREMENTS = set() From c442280e186bb3f14f00cc6a118f1072af01f0fd Mon Sep 17 00:00:00 2001 From: Pau Rodriguez-Estivill Date: Tue, 25 Jun 2019 20:08:06 +0200 Subject: [PATCH 3/4] Added changelog file Signed-off-by: Pau Rodriguez-Estivill --- changelog.d/5555.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5555.bugfix diff --git a/changelog.d/5555.bugfix b/changelog.d/5555.bugfix new file mode 100644 index 000000000000..535807ed5c4b --- /dev/null +++ b/changelog.d/5555.bugfix @@ -0,0 +1 @@ +Fixed m.login.jwt using unregistred user_id and added conditional dependencies for jwt. From c115933932f2281c1e6636505a522c491c60c351 Mon Sep 17 00:00:00 2001 From: Pau Rodriguez-Estivill Date: Tue, 25 Jun 2019 20:26:34 +0200 Subject: [PATCH 4/4] Improved changelog description Signed-off-by: Pau Rodriguez-Estivill --- changelog.d/5555.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/5555.bugfix b/changelog.d/5555.bugfix index 535807ed5c4b..c0b1ecf81aa0 100644 --- a/changelog.d/5555.bugfix +++ b/changelog.d/5555.bugfix @@ -1 +1 @@ -Fixed m.login.jwt using unregistred user_id and added conditional dependencies for jwt. +Fixed m.login.jwt using unregistred user_id and added pyjwt>=1.6.4 as jwt conditional dependencies. Contributed by Pau Rodriguez-Estivill.