summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorTimshel <Timshel@users.noreply.github.com>2024-05-08 15:56:16 +0200
committerGitHub <noreply@github.com>2024-05-08 13:56:16 +0000
commit34a8652366c60d785e5c0510749e615d0dec9ec0 (patch)
tree7ec986f3c034b9f723ba72cfd37657f5d13eac4a /tests
parentUpdate PyO3 to 0.21 (#17162) (diff)
downloadsynapse-34a8652366c60d785e5c0510749e615d0dec9ec0.tar.xz
Optional whitespace support in Authorization (#1350) (#17145)
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/federation/transport/server/test__base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/federation/transport/server/test__base.py b/tests/federation/transport/server/test__base.py
index 065e85957e..0e3b41ec4d 100644
--- a/tests/federation/transport/server/test__base.py
+++ b/tests/federation/transport/server/test__base.py
@@ -147,3 +147,10 @@ class BaseFederationAuthorizationTests(unittest.TestCase):
             ),
             ("foo", "ed25519:1", "sig", "bar"),
         )
+        # test that "optional whitespace(s)" (space and tabulation) are allowed between comma-separated auth-param components
+        self.assertEqual(
+            _parse_auth_header(
+                b'X-Matrix origin=foo , key="ed25519:1",  sig="sig",	destination="bar",		extra_field=ignored'
+            ),
+            ("foo", "ed25519:1", "sig", "bar"),
+        )