element-hq / element-hq/synapse
Explicitly empty `url_preview_ip_range_blacklist` still didn't enable URL previews
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#13232](https://github.com/matrix-org/synapse/issues/13232).
---
### Description
I specified this in my config:
```yaml
url_preview_enabled: true
url_preview_ip_range_blacklist: []
```
and URL previews were not enabled. Once I specified a CIDR range under the blacklist, it started up just fine.
For a localhost server I was expecting to be able to URL preview from everywhere, as I understand the risks of clients being able to access "internal" infrastructure.
### Steps to reproduce
see above
### Homeserver
localhost
### Synapse Version
1.62.0
### Installation Method
Docker (matrixdotorg/synapse)
### Platform
Windows host, Docker.
### Relevant log output
```shell
N/A
```
### Anything else that would be useful to know?
it might be reasonable to allow an empty list when the server has a domain name that can't possibly federate (like `localhost`)?
Contributor guide
Research direction
Start by reproducing the reported configuration with URL previews enabled and an explicitly empty url_preview_ip_range_blacklist on Synapse 1.62.0. Trace how this setting is validated and decide the intended security behavior for an empty list, then document the decision with a regression test covering the configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100