mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-19 17:56:19 +03:00
Remove different behaviour for fed vs. nonfed
This commit is contained in:
parent
e1feb45f2b
commit
152d7a8eaf
3 changed files with 3 additions and 5 deletions
|
@ -76,7 +76,7 @@ class IPBlacklistingResolver(object):
|
|||
addresses, preventing DNS rebinding attacks on URL preview.
|
||||
"""
|
||||
|
||||
def __init__(self, reactor, ip_whitelist, ip_blacklist, federation=False):
|
||||
def __init__(self, reactor, ip_whitelist, ip_blacklist):
|
||||
"""
|
||||
Args:
|
||||
reactor (twisted.internet.reactor)
|
||||
|
@ -87,7 +87,6 @@ class IPBlacklistingResolver(object):
|
|||
self._reactor = reactor
|
||||
self._ip_whitelist = ip_whitelist
|
||||
self._ip_blacklist = ip_blacklist
|
||||
self._from_federation = federation
|
||||
|
||||
def resolveHostName(self, recv, hostname, portNumber=0):
|
||||
|
||||
|
|
|
@ -182,7 +182,6 @@ class MatrixFederationHttpClient(object):
|
|||
# addresses, to prevent DNS rebinding.
|
||||
nameResolver = IPBlacklistingResolver(
|
||||
real_reactor, None, hs.config.federation_ip_range_blacklist,
|
||||
federation=True,
|
||||
)
|
||||
|
||||
@implementer(IReactorPluggableNameResolver)
|
||||
|
|
|
@ -233,7 +233,7 @@ class FederationClientTests(HomeserverTestCase):
|
|||
fetch_d = cl.get_json("internal:8008", "foo/bar")
|
||||
|
||||
# Nothing happened yet
|
||||
#self.assertNoResult(fetch_d)
|
||||
self.assertNoResult(fetch_d)
|
||||
|
||||
# should have reset logcontext to the sentinel
|
||||
check_logcontext(LoggingContext.sentinel)
|
||||
|
@ -249,7 +249,7 @@ class FederationClientTests(HomeserverTestCase):
|
|||
self.pump()
|
||||
|
||||
# Nothing has happened yet
|
||||
self.failureResultOf(d, SynapseError)
|
||||
self.assertNoResult(d)
|
||||
|
||||
# Check that it was unable to resolve the address
|
||||
clients = self.reactor.tcpClients
|
||||
|
|
Loading…
Reference in a new issue