element-hq / element-hq/synapse
Accepts "1" for a boolean
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#10497](https://github.com/matrix-org/synapse/issues/10497).
---
When the matrix specification says a type is a boolean, synapse accepts both `0`, `1`, `false` and `true` in the request, while only `false` and `true` are valid values.
I've seen this behaviour in at least the typing API (https://github.com/matrix-org/sytest/pull/1088) and the register API (https://github.com/matrix-org/sytest/pull/1089)
Contributor guide
Research direction
Start with the typing API and register API request handling, then compare their boolean validation with the Matrix specification. Review the related sytest coverage referenced in PRs #1088 and #1089. Done means invalid numeric boolean values are rejected while the specified boolean values remain accepted in both APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100