Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit b5833a2

Browse files
committed
Add changelog
1 parent 60d3c57 commit b5833a2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

changelog.d/6011.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use account_threepid_delegate.email and account_threepid_delegate.msisdn for validating threepid sessions.

synapse/handlers/identity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def threepid_from_creds(self, id_server, creds):
8484
id_server (str|None): The identity server to validate 3PIDs against. If None,
8585
we will attempt to extract id_server creds
8686
87-
creds (dict[str, str]): Dictionary containing the following key:
88-
* id_server: An optional domain name of an identity server
87+
creds (dict[str, str]): Dictionary containing the following keys:
88+
* id_server|idServer: An optional domain name of an identity server
8989
* client_secret|clientSecret: A unique secret str provided by the client
9090
* sid: The ID of the validation session
9191
@@ -106,7 +106,7 @@ def threepid_from_creds(self, id_server, creds):
106106
)
107107
if not id_server:
108108
# Attempt to get the id_server from the creds dict
109-
id_server = creds.get("id_server")
109+
id_server = creds.get("id_server") or creds.get("idServer")
110110
if not id_server:
111111
raise SynapseError(
112112
400, "Missing param id_server in creds", errcode=Codes.MISSING_PARAM

synapse/rest/client/v2_alpha/account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def on_POST(self, request):
523523
requester = yield self.auth.get_user_by_req(request)
524524
user_id = requester.user.to_string()
525525

526-
# Retrieve the identity server from the request
526+
# Specify None as the identity server to retrieve it from the request body instead
527527
threepid = yield self.identity_handler.threepid_from_creds(None, threepid_creds)
528528

529529
if not threepid:

0 commit comments

Comments
 (0)