diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-06-28 20:31:53 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-06-28 20:32:00 +0100 |
commit | f4f1cda928911197332a9a8bffcfb67c2b5b81e4 (patch) | |
tree | 0e503f9ad56153962096540b3c1a56b18359b0d2 /synapse/appservice | |
parent | Attempt to be more performant on PyPy (#3462) (diff) | |
download | synapse-f4f1cda928911197332a9a8bffcfb67c2b5b81e4.tar.xz |
add ip_range_whitelist parameter to limit where ASes can connect from
Diffstat (limited to 'synapse/appservice')
-rw-r--r-- | synapse/appservice/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py index d1c598622a..328cbfa284 100644 --- a/synapse/appservice/__init__.py +++ b/synapse/appservice/__init__.py @@ -85,7 +85,8 @@ class ApplicationService(object): NS_LIST = [NS_USERS, NS_ALIASES, NS_ROOMS] def __init__(self, token, hostname, url=None, namespaces=None, hs_token=None, - sender=None, id=None, protocols=None, rate_limited=True): + sender=None, id=None, protocols=None, rate_limited=True, + ip_range_whitelist=None): self.token = token self.url = url self.hs_token = hs_token @@ -93,6 +94,7 @@ class ApplicationService(object): self.server_name = hostname self.namespaces = self._check_namespaces(namespaces) self.id = id + self.ip_range_whitelist = ip_range_whitelist if "|" in self.id: raise Exception("application service ID cannot contain '|' character") |