Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve middleware for rejecting unknown Client-Server API versions
Related to: - https://matrix.org/blog/2021/11/09/matrix-v-1-1-release - matrix-org/synapse#11318 - spantaleev/matrix-docker-ansible-deploy#1404 Our `denyUnsupportedApiVersionsMiddleware` middleware was trying to match `rXXX` versions and reject unsupported ones (anything besides `r0`), but now that the prefix is changing (`vXXX`) we were not matching the new one correctly and were letting `vXXX` requests go through. This is not a security issue yet, as no stable version of a homeserver supports v3-prefixed APIs yet, but an upcoming Synapse v1.48.0 is slated to add support for those. An old matrix-corporal version (lacking this patch) combined with Synapse v1.48.0+ will let such v3 requests go through, effectively circuimventing matrix-corporal's protections.
- Loading branch information