Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
add a url_preview_ip_range_whitelist config param #760
Conversation
ara4n
assigned
NegativeMjark
May 1, 2016
NegativeMjark
commented on an outdated diff
May 3, 2016
| @@ -380,13 +380,15 @@ def post_urlencoded_get_raw(self, url, args={}): | ||
| class SpiderEndpointFactory(object): | ||
| def __init__(self, hs): | ||
| self.blacklist = hs.config.url_preview_ip_range_blacklist | ||
| + if hasattr(hs.config, "url_preview_ip_range_whitelist"): | ||
| + self.whitelist = hs.config.url_preview_ip_range_whitelist |
NegativeMjark
Contributor
|
|
@NegativeMjark thanks - anything else? |
NegativeMjark
commented on an outdated diff
May 4, 2016
| @@ -100,6 +100,11 @@ def read_config(self, config): | ||
| "to work" | ||
| ) | ||
| + if "url_preview_ip_range_whitelist" in config: | ||
| + self.url_preview_ip_range_whitelist = IPSet( | ||
| + config["url_preview_ip_range_whitelist"] | ||
| + ) |
NegativeMjark
Contributor
|
|
@ara4n I think either one of my suggestions would make the tests pass. I don't think I have any further comments. |
NegativeMjark
added some commits
May 16, 2016
|
lgtm, thanks for fixing it up for me; apologies that it got lost during the main vec delivery. |
ara4n commentedMay 1, 2016
...so we can whitelist the matrix.org IP space