From 29ae04af3b0867642ebae9fa0c2534d4a6c0c975 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Tue, 9 Feb 2021 17:50:25 +0100 Subject: [PATCH] Remove unneeded type constraints on 3rd party protocol lookup responses --- changelog.d/9361.bugfix | 1 + synapse/appservice/api.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 changelog.d/9361.bugfix diff --git a/changelog.d/9361.bugfix b/changelog.d/9361.bugfix new file mode 100644 index 000000000..4d0477f03 --- /dev/null +++ b/changelog.d/9361.bugfix @@ -0,0 +1 @@ +Fix a bug causing Synapse to impose the wrong type constraints on fields when processing responses from appservices to `/_matrix/app/v1/thirdparty/user/{protocol}`. diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py index e366a982b..11aee50f7 100644 --- a/synapse/appservice/api.py +++ b/synapse/appservice/api.py @@ -76,9 +76,6 @@ def _is_valid_3pe_result(r, field): fields = r["fields"] if not isinstance(fields, dict): return False - for k in fields.keys(): - if not isinstance(fields[k], str): - return False return True