element-hq / element-hq/synapse
Config should yell and warn about float values being cast to ints
Open
A-Config
O-Occasional
S-Major
T-Defect
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
Wherever an `int` is used for a config value, if someone accidentally provides a `float` number value, it will get floored (rounded down).
This can lead to misconfigurations like specifying `0.5` for the rate limiting [`burst_count`](https://github.com/element-hq/synapse/blob/develop/docs/usage/configuration/config_documentation.md#ratelimiting) which will get rounded down to `0` and not allow requests at all (real example: https://github.com/element-hq/synapse/pull/18159).
Contributor guide
Assessment
This issue has not been assessed yet.