feat: Implement sketchy backwards compatibility for illegal invites #2072

Closed
nex wants to merge 4 commits from nex/feat/backwards-compat-invites into main
Owner

I'm not chuffed about making this but since the ecosystem is seemingly slow to catch up, it's probably necessary.

Adds a config toggle that allows disabling invite state validation on incoming federated invites if they don't send correctly formatted data.

This PR will not be merged

This PR will not be merged as it is a temporary measure that significantly compromises server security. This PR and the following usage instructions are provided as a courtesy, as many users have reported that they want invites to "just work", even though they are insecure. Note that the problem is temporary, and is an issue with other homeservers, NOT continuwuity.

Setting this up

Since this will not be merged, you will have to compile the branch yourself. Clone the repository, checkout nex/feat/backwards-compat-invites, and run cargo build --release - https://continuwuity.org/development/index.html

You will then need to edit your configuration file and set enable_legacy_invite_support=true.

Only after deploying the self-compiled binary AND setting the config option will Continuwuity then re-permit insecure invites, as it did prior to v26.6.1.

Important

You are making your server INSECURE! This allows malicious actors to COMPLETELY FABRICATE INVITE DATA which CANNOT BE VERIFIED. Evil servers can trick you into joining rooms you did not intend to join without this validation. You will NOT receive support with this, and if you get pwned, this is entirely your fault.

I'm not chuffed about making this but since the ecosystem is seemingly slow to catch up, it's probably necessary. Adds a config toggle that allows disabling invite state validation on incoming federated invites if they don't send correctly formatted data. # This PR will not be merged This PR will not be merged as it is a temporary measure that significantly compromises server security. This PR and the following usage instructions are provided as a courtesy, as many users have reported that they want invites to "just work", **even though they are insecure**. Note that the problem is **temporary**, and is an issue with **other homeservers**, NOT continuwuity. ## Setting this up Since this will not be merged, you will have to **compile the branch yourself**. Clone the repository, checkout `nex/feat/backwards-compat-invites`, and run `cargo build --release` - https://continuwuity.org/development/index.html You will then need to edit your configuration file and set `enable_legacy_invite_support=true`. Only after deploying the self-compiled binary AND setting the config option will Continuwuity then re-permit insecure invites, as it did prior to v26.6.1. > [!IMPORTANT] > **You are making your server INSECURE!** This allows malicious actors to COMPLETELY FABRICATE INVITE DATA which CANNOT BE VERIFIED. Evil servers **can trick you into joining rooms you did not intend to join** without this validation. You will NOT receive support with this, and if you get pwned, this is entirely your fault.
nex added this to the 26.8.0 milestone 2026-07-29 16:20:49 +00:00
nex self-assigned this 2026-07-29 16:20:49 +00:00
feat: Implement sketchy backwards compatibility for illegal invites
Some checks failed
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 3s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 6s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m7s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m2s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 7m59s
cab2f53c22
nex changed title from feat: Implement sketchy backwards compatibility for illegal invites to WIP: feat: Implement sketchy backwards compatibility for illegal invites 2026-07-29 16:27:51 +00:00
Owner

Having this branch is fine if people want to compile their own insecure homeservers, but I have no intention to approve this being merged into main. It is firmly not our problem to work around Synapse being incompatible with the specification that they wrote themselves.

Having this branch is fine if people want to compile their own insecure homeservers, but I have no intention to approve this being merged into main. It is firmly not our problem to work around Synapse being incompatible with the specification that they wrote themselves.
feat: Support accepting invites consisting of solely stripped state
Some checks failed
Checks / Prek / Check changed files (pull_request) Successful in 5s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 6s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 53s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m6s
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
e327912a39
Author
Owner

I'm not inclined to merge it either since it unambiguously tangibly reduces security, I can't in good faith merge it. The only reason I made a PR is so I can link to it in the relevant issue when it's ready.

I'm not inclined to merge it either since it unambiguously tangibly reduces security, I can't in good faith merge it. The only reason I made a PR is so I can link to it in the relevant issue when it's ready.
fix: validate_legacy_invite_state_event isn't async
Some checks failed
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 10s
Checks / Prek / Check changed files (pull_request) Successful in 8s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m13s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m15s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m14s
d2f28a076d
fix: Don't panic when m.room.create event isn't a PDU
Some checks failed
Checks / Prek / Check changed files (pull_request) Successful in 5s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 6s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m8s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m16s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 5m9s
68ee16962a
nex changed title from WIP: feat: Implement sketchy backwards compatibility for illegal invites to feat: Implement sketchy backwards compatibility for illegal invites 2026-07-29 17:34:07 +00:00
nex closed this pull request 2026-07-29 17:38:51 +00:00
Author
Owner

I can't believe I opened a PR that introduces a vulnerability dude what is this timeline

I can't believe I opened a PR that introduces a vulnerability dude what is this timeline
Some checks failed
Checks / Prek / Check changed files (pull_request) Successful in 5s
Required
Details
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 6s
Required
Details
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m8s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m16s
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 5m9s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!2072
No description provided.