-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow workers to serve new v3 APIs #1404
Conversation
We'll probably lose the changes to It doesn't seem like it hurts to merge this, however. Does the |
Ah I didn't know about Develop does serve v3 APIs as of matrix-org/synapse#11318 I believe the |
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.
Related to: - https://matrix.org/blog/2021/11/09/matrix-v-1-1-release - matrix-org/synapse#11318 - spantaleev/matrix-docker-ansible-deploy#1404 The upcoming Synapse v1.48.0 release is likely to expose all these `r0` APIs that we've used till now as `v3` APIs. Both the `r0` and `v3` prefixes lead to the same APIs on the homeserver. matrix-corporal 2.1.5 already properly handles rejecting unknown v-prefixed versions (`v3` included), which patched a potential future security vulnerability (when Synapse v1.48.0 ultimately gets released). This patch adds to it and lets `v3` requests go through and get handled the same way `r0` requests are handled.
There was also a 2.1.5 security release made today. 2.2.0 contains the same security fix + more. Both make handling of Client-Server API v3-prefixed requests better. Related to #1404
I see that you've also updated Synapse's I'm merging this as-is. Thank you! 👍 |
There was also a 2.1.5 security release made today. 2.2.0 contains the same security fix + more. Both make handling of Client-Server API v3-prefixed requests better. Related to spantaleev#1404
Support for these APIs will probably be in Synapse 1.48.0 but this can get merged at any time.