Revert "Add test case to detect dodgy b64 encoding"

This reverts commit 5fe76b9434.

I think I had this accidentally commited on my local develop branch, and
so it accidentally got merged into upstream develop.

This should re-land with corrections in #16504.
pull/16550/head
David Robertson 2023-10-24 14:33:37 +01:00
parent 2f35424812
commit 2f1065f81b
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD
1 changed files with 0 additions and 14 deletions

View File

@ -217,20 +217,6 @@ class ProxyParserTests(TestCase):
) )
class TestBasicProxyCredentials(TestCase):
def test_long_user_pass_string_encoded_without_newlines(self) -> None:
"""Reproduces https://github.com/matrix-org/synapse/pull/16504."""
creds = BasicProxyCredentials(
b"looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonguser:pass@proxy.local:9988"
)
auth_value = creds.as_proxy_authorization_value()
self.assertNotIn(b"\n", auth_value)
self.assertEqual(
creds.as_proxy_authorization_value(),
b"Basic: bG9vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vbmd1c2VyOnBhc3M=",
)
class MatrixFederationAgentTests(TestCase): class MatrixFederationAgentTests(TestCase):
def setUp(self) -> None: def setUp(self) -> None:
self.reactor = ThreadedMemoryReactorClock() self.reactor = ThreadedMemoryReactorClock()