mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-30 20:37:36 +00:00
Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13620144d7 | ||
|
|
43da51ca0d | ||
|
|
b375170fba | ||
|
|
347048c35f | ||
|
|
84082a6515 | ||
|
|
0af4c49657 | ||
|
|
b0a829971d | ||
|
|
c0ee45192a | ||
|
|
f97cfa12ac | ||
|
|
ff15197ad8 | ||
|
|
3f8c855bfb | ||
|
|
1d4ff06337 | ||
|
|
4e65c054f2 | ||
|
|
67caa12b26 | ||
|
|
13f2d6cb76 | ||
|
|
bd270a3fee | ||
|
|
0670bd9c21 | ||
|
|
da7068cd60 |
No files matched your search
@@ -71,7 +71,7 @@ runs:
|
||||
|
||||
- name: Install timelord-cli and git-warp-time
|
||||
if: steps.check-binaries.outputs.need-install == 'true'
|
||||
uses: https://github.com/taiki-e/install-action@fe3acb53a98b62c772db35de75ce0e4595e7ca8c # v2
|
||||
uses: https://github.com/taiki-e/install-action@073e1fd0bc889c9aee68dbaaa927cde1b5653a83 # v2
|
||||
with:
|
||||
tool: git-warp-time,timelord-cli@3.0.1
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ jobs:
|
||||
- package: default-static-aarch64
|
||||
filename: conduwuit-linux-static-arm64
|
||||
|
||||
- package: max-perf-static-aarch64
|
||||
filename: conduwuit-linux-static-arm64-maxperf
|
||||
- package: max-perf-haswell-static-x86_64
|
||||
filename: conduwuit-haswell-linux-static-amd64-maxperf
|
||||
#- package: max-perf-static-aarch64
|
||||
# filename: conduwuit-linux-static-arm64-maxperf
|
||||
#- package: max-perf-haswell-static-x86_64
|
||||
# filename: conduwuit-haswell-linux-static-amd64-maxperf
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
path: binaries
|
||||
merge-multiple: true
|
||||
- name: Create Release and Upload
|
||||
uses: https://github.com/softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3
|
||||
uses: https://github.com/softprops/action-gh-release@88b783939ccdbabad21b9a37510aed7fad5f2e60 # v3
|
||||
with:
|
||||
draft: true
|
||||
files: binaries/*
|
||||
@@ -110,6 +110,7 @@ jobs:
|
||||
registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
|
||||
|
||||
build-maxperf:
|
||||
if: false
|
||||
name: "Build ${{ matrix.slug }} (max-perf)"
|
||||
runs-on: dind
|
||||
needs: build-release
|
||||
@@ -176,6 +177,7 @@ jobs:
|
||||
digest: ${{ steps.build.outputs.digest }}
|
||||
|
||||
merge-maxperf:
|
||||
if: false
|
||||
name: "Create Max-Perf Manifest"
|
||||
runs-on: dind
|
||||
needs: build-maxperf
|
||||
@@ -198,7 +200,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-release
|
||||
- build-maxperf
|
||||
#- build-maxperf
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Download binary artifacts
|
||||
@@ -208,7 +210,7 @@ jobs:
|
||||
path: binaries
|
||||
merge-multiple: true
|
||||
- name: Create Release and Upload
|
||||
uses: https://github.com/softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3
|
||||
uses: https://github.com/softprops/action-gh-release@88b783939ccdbabad21b9a37510aed7fad5f2e60 # v3
|
||||
with:
|
||||
draft: true
|
||||
files: binaries/*
|
||||
|
||||
+108
@@ -1,3 +1,111 @@
|
||||
# Continuwuity v26.11.0 (2026-11-30)
|
||||
|
||||
## Features
|
||||
|
||||
- Added opt-in OpenTelemetry metrics, exported over OTLP or scraped by Prometheus from `/_continuwuity/metrics`, and a Grafana dashboard. Contributed by @eleboucher. (prometheus-metrics)
|
||||
- Add support for using custom DNS servers instead of using /etc/resolv.conf. Contributed by @s1lv3r. ([#2056](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2056))
|
||||
- Continuwuity now supports configuring additional trusted audience values for deployments using OIDC with an IDP that sends them. Contributed by @ginger ([#2226](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2226))
|
||||
- "!admin users list" now hides deactivated users by default, but can display them with the optional "--show-deactivated" flag. "--hide-suspended" and "--hide-locked" have been added as well, which stop suspended and locked users from being displayed respectively. Contributed by @Clubs. ([#2292](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2292))
|
||||
- Added support for [MSC4494: Membership-based invite blocking](https://github.com/matrix-org/matrix-spec-proposals/pull/4494) ([#2297](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2297))
|
||||
- Added support for acting as a trusted server, meaning the `trusted_servers` list can consist of servers that are either Synapse OR continuwuity. ([#2314](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2314))
|
||||
- Appservices now receive typing indicators and read receipts. Contributed by @Jade ([#2327](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2327))
|
||||
- Added support for servers returning 410 gone to indicate they are no longer serving a Matrix server ([MSC4188](https://github.com/matrix-org/matrix-spec-proposals/pull/4188)). Contributed by @nex and @silversys ([#2355](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2355))
|
||||
- Added support for [MSC4388](https://github.com/matrix-org/matrix-spec-proposals/pull/4388), allowing compatible Matrix clients to log in to Continuwuity by scanning a QR code on an already logged-in client. Contributed by @ginger. ([#2429](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2429))
|
||||
- Changed the policy on unstable features, disabling most by default and making them configurable in a tidy little `experiments` configuration. See also: #1884. ([#2517](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2517))
|
||||
- Dropped support for `hardened_malloc` and add support for `mimalloc` instead. Contributed by @nex and @jade. ([#2564](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2564))
|
||||
- Continuwuity will now request the `profile` OIDC scope from identity providers by default to improve compatibility with identity providers that require it to access users' profile claims, as recommended by the OIDC specification. Contributed by @ginger. ([#2588](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2588))
|
||||
- Advertise support for Matrix v1.6. Contributed by @jade ([#2593](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2593))
|
||||
- Added support for [MSC4363](https://github.com/matrix-org/matrix-spec-proposals/pull/4363) (OAuth step-up authentication). Contributed by @ginger.
|
||||
- Added support for [MSC2815](https://github.com/matrix-org/matrix-spec-proposals/pull/2815), allowing room moderators to fetch the original content of redacted events, behind the `allow_moderators_to_view_redacted_content` config option. Contributed by @eleboucher.
|
||||
- Added support for [MSC4484](https://github.com/matrix-org/matrix-spec-proposals/pull/4484). Clients which use the built-in Matrix server administration APIs will need to ask for the appropriate scope when signing in with OAuth. Contributed by @ginger.
|
||||
- Added support for the stable MatrixRTC transports discovery endpoint (`GET /_matrix/client/v1/rtc/transports`) from the accepted [MSC4143](https://github.com/matrix-org/matrix-spec-proposals/pull/4143), advertised via the `org.matrix.msc4143.stable` unstable feature. The unstable endpoint remains available. Contributed by @Henry-Hiles (QuadRadical).
|
||||
- Added the `GET /_matrix/client/v1/rooms/{roomId}/timestamp_to_event` endpoint as per [MSC3030](https://github.com/matrix-org/matrix-spec-proposals/pull/3030), letting clients find the event closest to a given timestamp. Contributed by @eleboucher.
|
||||
- Check content-type header on federation responses, ignoring any that don't match (spec compliance)
|
||||
- Implemented unstable support for [MSC4560] (Stripped state requests over federation). Contributed by @ginger.
|
||||
|
||||
[MSC4560]: https://github.com/matrix-org/matrix-spec-proposals/pull/4560
|
||||
- Profile banners are now treated as images when imported from OIDC claims, like avatars already were.
|
||||
- Remove support for legacy, unauthenticated media, including the `allow_legacy_media` and `freeze_legacy_media` options.
|
||||
- The first-run version of the web UI now includes a link to the registration page. Contributed by @ginger
|
||||
|
||||
## Bugfixes
|
||||
|
||||
- Fixed `/get_missing_events` rejecting requests with more `earliest_events` than the `limit`. Contributed by @eleboucher. (get-missing-events-earliest-limit)
|
||||
- Fix outgoing federation stalling after a sender worker panics. Contributed by @eleboucher. (sender-supervision)
|
||||
- SEC25 fix. See <https://forgejo.ellis.link/continuwuation/advisories> at a later date for more info. Contributed by @jade. (SEC25)
|
||||
- SEC29 fix. See <https://forgejo.ellis.link/continuwuation/advisories> at a later date for more info. Contributed by @nex. (SEC29)
|
||||
- SEC48 fix. See <https://forgejo.ellis.link/continuwuation/advisories> at a later date for more info. Contributed by @jade. (SEC48)
|
||||
- SEC50 fix. See <https://forgejo.ellis.link/continuwuation/advisories> at a later date for more info. Contributed by @jade. (SEC50)
|
||||
- SEC51 fix. See <https://forgejo.ellis.link/continuwuation/advisories> at a later date for more info. Contributed by @jade. (SEC51)
|
||||
- Invitees are now added as room creators when creating a v12+ trusted private chat. Contributed by @ginger. ([#2162](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2162))
|
||||
- Fixed push gateway URLs containing the configured notification path outside of their suffix. Contributed by @eleboucher. ([#2261](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2261))
|
||||
- "!admin users change-email" now verifies a user exists before attempting to change their email. Contributed by @Clubs. ([#2298](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2298))
|
||||
- Fixed URL preview image MIME types and rejected failed downloads. Contributed by @eleboucher. ([#2308](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2308))
|
||||
- Correctly set RocksDB column options, including enabling block caches. Contributed by @Jade ([#2345](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2345))
|
||||
- Fix some possible deadlocks/freezes and reduce lock contention (improving performance). Contributed by @Jade ([#2351](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2351))
|
||||
- Fixed Prometheus accounting for in-flight requests, federation PDU lag, latency buckets, and thumbnail sizes. Contributed by @eleboucher. ([#2354](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2354))
|
||||
- Once again fixed how room extremities are handled, fixing a problem that made continuwuity gradually make rooms needlessly complex, which also caused more frequent state resets. ([#2356](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2356))
|
||||
- Requests waiting on `/_matrix/client/v3/sync` can now be interrupted by the server shutdown, unblocking the 30-second shutdown delay imposed on a quiet server. ([#2361](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2361))
|
||||
- The OAuth identity reset page is no longer linked from the account management UI to reduce confusion. Contributed by @ginger. ([#2383](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2383))
|
||||
- Fixed a worker panic when knocking on a room over federation. Contributed by @eleboucher. ([#2387](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2387))
|
||||
- Perform more validation on events received during atomic gapfill from remote servers, fixing a panic if bad data was persisted by another server and later lazily fetched by us. ([#2400](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2400))
|
||||
- Fix remote server key signature verification when extra fields exist. Contributed by @hexchen ([#2415](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2415))
|
||||
- Redirect URIs in OAuth clients' metadata are now properly validated to be on a subdomain of the OAuth issuer URL domain. Contributed by @ginger. ([#2421](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2421))
|
||||
- Fix v12 rooms created by the same user in the same millisecond ending up as the same room. Contributed by @eleboucher. ([#2424](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2424))
|
||||
- Client-server API endpoints are now properly ratelimited for unauthenticated requests. Contributed by @ginger. ([#2444](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2444))
|
||||
- URL previews no longer completely fail if downloading auxiliary content (images/videos/audio) fails. Contributed by @nex. ([#2448](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2448))
|
||||
- Setting a profile key longer than 255 bytes now returns 400 `M_KEY_TOO_LARGE` as required by the spec, instead of 413 `M_TOO_LARGE`. ([#2451](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2451))
|
||||
- Setting profile data that would make the profile exceed 64 KiB now returns 400 `M_PROFILE_TOO_LARGE` as required by the spec, instead of a 500 error. ([#2451](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2451))
|
||||
- Appservices masquerading as a device that does not exist now receive 400 `M_UNKNOWN_DEVICE` as required by the spec, instead of 403 `M_FORBIDDEN`. ([#2451](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2451))
|
||||
- Setting `m.fully_read` via the account data endpoints now returns 405 `M_BAD_JSON` as required by the spec, instead of 400. ([#2451](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2451))
|
||||
- The `m.forget_forced_upon_leave` capability now reflects the `forget_forced_upon_leave` config option instead of always being advertised as enabled. ([#2452](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2452))
|
||||
- Fixed push notifications for membership events setting `user_is_target` based on the sender rather than the user being notified. ([#2454](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2454))
|
||||
- Ensure HTTP clients actually follow the `dns_servers` config option. Contributed by @silversys ([#2460](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2460))
|
||||
- `/_matrix/client/v3/sync` no longer waits 30 seconds if the `timeout` parameter is omitted or set to zero, correctly reflecting the specification's rule that such requests should return immediately, even if they are empty. ([#2462](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2462))
|
||||
- Reworked event relations to follow the spec more closely. Pagination of `/relations` now returns the correct pages and `next_batch` tokens, recursive relations are returned in the right order without duplicates, and bundled `m.reference` aggregations now include every reference. Contributed by @Henry-Hiles (QuadRadical). ([#2465](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2465))
|
||||
- Read receipts are now more spec compliant, will work better in threads and are less likely to end up causing loops with other software. Contributed by @Jade ([#2481](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2481))
|
||||
- Fix the DNS resolver failing to start without `/etc/resolv.conf` when `dns_servers` is configured. Contributed by @eleboucher. ([#2495](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2495))
|
||||
- Fixed OIDC logins failing after the identity provider rotates its signing keys. Contributed by @eleboucher. ([#2497](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2497))
|
||||
- Fixed the experiments implementation in #2517 not properly disabling some functionality when associated experiments weren't enabled. ([#2533](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2533))
|
||||
- The sticky events feature flag is correctly advertised in `/_matrix/client/versions` again after it was accidentally removed in #2517. ([#2542](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2542))
|
||||
- A message is now sent to the admin room when a user logs in for the first time through an OIDC provider, if admin room notices are enabled. Contributed by @ginger. ([#2561](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2561))
|
||||
- Fix soundness and correctness issues in the jemalloc interface, improving performance. Contributed by @Jade ([#2565](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2565))
|
||||
- Modernised the room knocking helper functions to make them match the behaviour of our room join helpers, which are safer and more efficient. This also fixes a bug that caused an error when knocking on rooms not local to the server. Contributed by @nex. ([#2572](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2572))
|
||||
- Network issues while refreshing an access token will no longer cause OAuth-compatible clients to be forcibly logged out. Contributed by @ginger. ([#2587](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2587))
|
||||
- Attempting to start a UIAA session on a homeserver with UIAA disabled will now return `403 M_UNAUTHORIZED` instead of `404 M_UNSUPPORTED`. Contributed by @ginger. ([#2589](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2589))
|
||||
- Fix minor Matrix state resolution bugs where some events were incorrectly prioritised. Contributed by @Jade ([#2621](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2621))
|
||||
- Creating a room with valid but non-canonical JSON now returns `400 M_BAD_JSON` instead of panicking the worker and returning `500 M_UNKNOWN`.
|
||||
- Fix account data updates sent at the same time leaving old copies behind, which every initial sync then returned. Existing copies are removed on startup. Contributed by @eleboucher.
|
||||
- Fix gap filling skipping outlier events that are missing their previous events. Contributed by @eleboucher.
|
||||
- Fix incoming federation events losing state changes when predecessors share the same state-before snapshot. Contributed by @eleboucher.
|
||||
- Fix new devices sometimes never reaching other users' device lists. Contributed by @eleboucher.
|
||||
- Fix state resolution applying events out of order, which could undo room joins. Contributed by @eleboucher.
|
||||
- Fix to-device messages, including room keys, sometimes being lost before delivery. Contributed by @eleboucher.
|
||||
- For deployments using OIDC with `profile_key_import_mode` set to `on_login`, users' avatars will no longer be clobbered if they didn't change their avatar since their last login.
|
||||
- Joining a local room the user is not allowed to join now returns `403 M_FORBIDDEN` instead of `500 M_UNKNOWN` when there are no other servers to try.
|
||||
- Legacy `/sync` now honours the `room.rooms`, `room.not_rooms`, `account_data.types` and `account_data.not_types` filter fields instead of returning every room and all account data. Contributed by @eleboucher.
|
||||
- Rejected events are no longer used as auth events during state resolution.
|
||||
- Room summary visibility checks are no longer incorrectly applied for remote rooms. Contributed by @ginger.
|
||||
- The userinfo endpoint is now accessible even if federation is disabled, allowing LiveKit to be used on servers with federation disabled without using the server name whitelist.
|
||||
|
||||
## Improved Documentation
|
||||
|
||||
- Add the Authentication section to document available auth methods for Continuwuity. The "delegated authentication" guide has also been migrated to here. Contributed by @stratself. ([#2234](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2234))
|
||||
- Add a guide for push notifications, detailing how it works, push gateway specifics, troubleshooting common issues, and pointing to external guides for UnifiedPush backends. Contributed by @stratself ([#2244](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2244))
|
||||
- The deploying page now includes vital general information about installing Continuwuity: release tracks, update steps, and post-installation recommendations. Contributed by @stratself ([#2252](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2252))
|
||||
- Add some missing instructions on configuring Continuwuity on the RPM page. Users are encouraged to use the [generic deploying docs](https://continuwuity.org/deploying/generic) for the bulk of guidance anyhow. Contributed by @stratself ([#2275](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2275))
|
||||
- Better, more succinct [introduction page](https://continuwuity.org/introduction.html). Contributed by @stratself ([#2279](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2279))
|
||||
- Add a section on [troubleshooting Docker issues](https://continuwuity.org/troubleshooting#docker-issues). Contributed by @stratself. ([#2324](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2324))
|
||||
- Instructions for Authelia added to the [OIDC guide](https://continuwuity.org/authentication/oidc.html). Contributed by @fhoekstra ([#2341](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2341))
|
||||
- Docker compose examples now use bind mounts by default, instead of Docker volumes, as they are easier to work with esp. for backup/restore. Contributed by @stratself. ([#2353](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2353))
|
||||
- The documentation now refers to the Continuwuity Docker service as `continuwuity` instead of `homeserver`.
|
||||
|
||||
## Misc
|
||||
|
||||
- #2423, #2556, #2595
|
||||
- Upgraded rocksdb from 11.1.1 to 11.12.0 and jemalloc to 5.4.0.
|
||||
|
||||
|
||||
# Continuwuity v26.11.0-rc.1 (2026-11-27)
|
||||
|
||||
## Features
|
||||
|
||||
Generated
+253
-225
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -12,7 +12,7 @@ license = "Apache-2.0"
|
||||
# See also `rust-toolchain.toml`
|
||||
readme = "README.md"
|
||||
repository = "https://forgejo.ellis.link/continuwuation/continuwuity"
|
||||
version = "26.11.0-rc.1"
|
||||
version = "26.11.0"
|
||||
|
||||
[workspace.metadata.crane]
|
||||
name = "conduwuit"
|
||||
@@ -119,7 +119,7 @@ default-features = false
|
||||
features = ["typed-header", "tracing", "cookie"]
|
||||
|
||||
[workspace.dependencies.axum-server]
|
||||
version = "0.9.0"
|
||||
version = "0.8.0"
|
||||
default-features = false
|
||||
|
||||
# to listen on both HTTP and HTTPS if listening on TLS dierctly from conduwuit for complement or sytest
|
||||
@@ -357,7 +357,7 @@ version = "1.1.1"
|
||||
# Used for matrix spec type definitions and helpers
|
||||
[workspace.dependencies.ruma]
|
||||
git = "https://github.com/ruma/ruma.git"
|
||||
rev = "6a7c905090556524c34a13302d491398aca0790f"
|
||||
rev = "d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
|
||||
features = [
|
||||
"appservice-api-c",
|
||||
"client-api",
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Implemented unstable support for [MSC4560] (Stripped state requests over federation). Contributed by @ginger.
|
||||
|
||||
[MSC4560]: https://github.com/matrix-org/matrix-spec-proposals/pull/4560
|
||||
@@ -1 +0,0 @@
|
||||
Added support for [MSC4484](https://github.com/matrix-org/matrix-spec-proposals/pull/4484). Clients which use the built-in Matrix server administration APIs will need to ask for the appropriate scope when signing in with OAuth. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Profile banners are now treated as images when imported from OIDC claims, like avatars already were.
|
||||
@@ -1 +0,0 @@
|
||||
Upgraded rocksdb from 11.1.1 to 11.12.0 and jemalloc to 5.4.0.
|
||||
@@ -1 +0,0 @@
|
||||
Added support for MSC4363 (OAuth step-up authentication). Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Check content-type header on federation responses, ignoring any that don't match (spec compliance)
|
||||
@@ -1 +0,0 @@
|
||||
The first-run version of the web UI now includes a link to the registration page. Contributed by @ginger
|
||||
@@ -1 +0,0 @@
|
||||
For deployments using OIDC with `profile_key_import_mode` set to `on_login`, users' avatars will no longer be clobbered if they didn't change their avatar since their last login.
|
||||
@@ -1 +0,0 @@
|
||||
Fix account data updates sent at the same time leaving old copies behind, which every initial sync then returned. Existing copies are removed on startup. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Room summary visibility checks are no longer incorrectly applied for remote rooms. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Creating a room with valid but non-canonical JSON now returns `400 M_BAD_JSON` instead of panicking the worker and returning `500 M_UNKNOWN`.
|
||||
@@ -1 +0,0 @@
|
||||
The userinfo endpoint is now accessible even if federation is disabled, allowing LiveKit to be used on servers with federation disabled without using the server name whitelist.
|
||||
@@ -1 +0,0 @@
|
||||
Fix new devices sometimes never reaching other users' device lists. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
The documentation now refers to the Continuwuity Docker service as `continuwuity` instead of `homeserver`.
|
||||
@@ -1 +0,0 @@
|
||||
Fix gap filling skipping outlier events that are missing their previous events. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Joining a local room the user is not allowed to join now returns `403 M_FORBIDDEN` instead of `500 M_UNKNOWN` when there are no other servers to try.
|
||||
@@ -1 +0,0 @@
|
||||
Added support for [MSC2815](https://github.com/matrix-org/matrix-spec-proposals/pull/2815), allowing room moderators to fetch the original content of redacted events, behind the `allow_moderators_to_view_redacted_content` config option. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Rejected events are no longer used as auth events during state resolution.
|
||||
@@ -1 +0,0 @@
|
||||
Remove support for legacy, unauthenticated media, including the `allow_legacy_media` and `freeze_legacy_media` options.
|
||||
@@ -1 +0,0 @@
|
||||
Added support for the stable MatrixRTC transports discovery endpoint (`GET /_matrix/client/v1/rtc/transports`) from the accepted MSC4143, advertised via the `org.matrix.msc4143.stable` unstable feature. The unstable endpoint remains available. Contributed by @Henry-Hiles (QuadRadical).
|
||||
@@ -1 +0,0 @@
|
||||
Fix incoming federation events losing state changes when predecessors share the same state-before snapshot. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Fix state resolution applying events out of order, which could undo room joins. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Legacy `/sync` now honours the `room.rooms`, `room.not_rooms`, `account_data.types` and `account_data.not_types` filter fields instead of returning every room and all account data. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Added the `GET /_matrix/client/v1/rooms/{roomId}/timestamp_to_event` endpoint as per MSC3030, letting clients find the event closest to a given timestamp. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Fix to-device messages, including room keys, sometimes being lost before delivery. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Add support for using custom DNS servers instead of using /etc/resolv.conf. Contributed by @s1lv3r.
|
||||
@@ -1 +0,0 @@
|
||||
Invitees are now added as room creators when creating a v12+ trusted private chat. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Continuwuity now supports configuring additional trusted audience values for deployments using OIDC with an IDP that sends them. Contributed by @ginger
|
||||
@@ -1 +0,0 @@
|
||||
Add the Authentication section to document available auth methods for Continuwuity. The "delegated authentication" guide has also been migrated to here. Contributed by @stratself.
|
||||
@@ -1 +0,0 @@
|
||||
Add a guide for push notifications, detailing how it works, push gateway specifics, troubleshooting common issues, and pointing to external guides for UnifiedPush backends. Contributed by @stratself
|
||||
@@ -1 +0,0 @@
|
||||
The deploying page now includes vital general information about installing Continuwuity: release tracks, update steps, and post-installation recommendations. Contributed by @stratself
|
||||
@@ -1 +0,0 @@
|
||||
Fixed push gateway URLs containing the configured notification path outside of their suffix. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Add some missing instructions on configuring Continuwuity on the RPM page. Users are encouraged to use the [generic deploying docs](https://continuwuity.org/deploying/generic) for the bulk of guidance anyhow. Contributed by @stratself
|
||||
@@ -1 +0,0 @@
|
||||
Better, more succinct [introduction page](https://continuwuity.org/introduction.html). Contributed by @stratself
|
||||
@@ -1 +0,0 @@
|
||||
"!admin users list" now hides deactivated users by default, but can display them with the optional "--show-deactivated" flag. "--hide-suspended" and "--hide-locked" have been added as well, which stop suspended and locked users from being displayed respectively. Contributed by @Clubs.
|
||||
@@ -1 +0,0 @@
|
||||
Added support for [MSC4494: Membership-based invite blocking](https://github.com/matrix-org/matrix-spec-proposals/pull/4494)
|
||||
@@ -1 +0,0 @@
|
||||
"!admin users change-email" now verifies a user exists before attempting to change their email. Contributed by @Clubs.
|
||||
@@ -1 +0,0 @@
|
||||
Fixed URL preview image MIME types and rejected failed downloads. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Added support for acting as a trusted server, meaning the `trusted_servers` list can consist of servers that are either Synapse OR continuwuity.
|
||||
@@ -1 +0,0 @@
|
||||
Add a section on [troubleshooting Docker issues](https://continuwuity.org/troubleshooting#docker-issues). Contributed by @stratself.
|
||||
@@ -1 +0,0 @@
|
||||
Appservices now receive typing indicators and read receipts. Contributed by @Jade
|
||||
@@ -1 +0,0 @@
|
||||
Instructions for Authelia added to the [OIDC guide](https://continuwuity.org/authentication/oidc.html). Contributed by @fhoekstra
|
||||
@@ -1 +0,0 @@
|
||||
Correctly set RocksDB column options, including enabling block caches. Contributed by @Jade
|
||||
@@ -1 +0,0 @@
|
||||
Fix some possible deadlocks/freezes and reduce lock contention (improving performance). Contributed by @Jade
|
||||
@@ -1 +0,0 @@
|
||||
Docker compose examples now use bind mounts by default, instead of Docker volumes, as they are easier to work with esp. for backup/restore. Contributed by @stratself.
|
||||
@@ -1 +0,0 @@
|
||||
Fixed Prometheus accounting for in-flight requests, federation PDU lag, latency buckets, and thumbnail sizes. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Added support for servers returning 410 gone to indicate they are no longer serving a Matrix server (MSC4188). Contributed by @nex and @silversys
|
||||
@@ -1 +0,0 @@
|
||||
Once again fixed how room extremities are handled, fixing a problem that made continuwuity gradually make rooms needlessly complex, which also caused more frequent state resets.
|
||||
@@ -1 +0,0 @@
|
||||
Requests waiting on `/_matrix/client/v3/sync` can now be interrupted by the server shutdown, unblocking the 30-second shutdown delay imposed on a quiet server.
|
||||
@@ -1 +0,0 @@
|
||||
The OAuth identity reset page is no longer linked from the account management UI to reduce confusion. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Fixed a worker panic when knocking on a room over federation. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Perform more validation on events received during atomic gapfill from remote servers, fixing a panic if bad data was persisted by another server and later lazily fetched by us.
|
||||
@@ -1 +0,0 @@
|
||||
Fix remote server key signature verification when extra fields exist. Contributed by @hexchen
|
||||
@@ -1 +0,0 @@
|
||||
Redirect URIs in OAuth clients' metadata are now properly validated to be on a subdomain of the OAuth issuer URL domain. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Updated internal Sentry integration setup to the new pattern required by the SDK.
|
||||
@@ -1 +0,0 @@
|
||||
Fix v12 rooms created by the same user in the same millisecond ending up as the same room. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Added support for MSC4388, allowing compatible Matrix clients to log in to Continuwuity by scanning a QR code on an already logged-in client. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Client-server API endpoints are now properly ratelimited for unauthenticated requests. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
URL previews no longer completely fail if downloading auxiliary content (images/videos/audio) fails. Contributed by @nex.
|
||||
@@ -1 +0,0 @@
|
||||
Setting a profile key longer than 255 bytes now returns 400 `M_KEY_TOO_LARGE` as required by the spec, instead of 413 `M_TOO_LARGE`.
|
||||
@@ -1 +0,0 @@
|
||||
Setting profile data that would make the profile exceed 64 KiB now returns 400 `M_PROFILE_TOO_LARGE` as required by the spec, instead of a 500 error.
|
||||
@@ -1 +0,0 @@
|
||||
Appservices masquerading as a device that does not exist now receive 400 `M_UNKNOWN_DEVICE` as required by the spec, instead of 403 `M_FORBIDDEN`.
|
||||
@@ -1 +0,0 @@
|
||||
Setting `m.fully_read` via the account data endpoints now returns 405 `M_BAD_JSON` as required by the spec, instead of 400.
|
||||
@@ -1 +0,0 @@
|
||||
The `m.forget_forced_upon_leave` capability now reflects the `forget_forced_upon_leave` config option instead of always being advertised as enabled.
|
||||
@@ -1 +0,0 @@
|
||||
Fixed push notifications for membership events setting `user_is_target` based on the sender rather than the user being notified.
|
||||
@@ -1 +0,0 @@
|
||||
Ensure HTTP clients actually follow the `dns_servers` config option. Contributed by @silversys
|
||||
@@ -1 +0,0 @@
|
||||
`/_matrix/client/v3/sync` no longer waits 30 seconds if the `timeout` parameter is omitted or set to zero, correctly reflecting the specification's rule that such requests should return immediately, even if they are empty.
|
||||
@@ -1 +0,0 @@
|
||||
Reworked event relations to follow the spec more closely. Pagination of `/relations` now returns the correct pages and `next_batch` tokens, recursive relations are returned in the right order without duplicates, and bundled `m.reference` aggregations now include every reference. Contributed by @Henry-Hiles (QuadRadical).
|
||||
@@ -1 +0,0 @@
|
||||
Read receipts are now more spec compliant, will work better in threads and are less likely to end up causing loops with other software. Contributed by @Jade
|
||||
@@ -1 +0,0 @@
|
||||
Fix the DNS resolver failing to start without `/etc/resolv.conf` when `dns_servers` is configured. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Fixed OIDC logins failing after the identity provider rotates its signing keys. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Changed the policy on unstable features, disabling most by default and making them configurable in a tidy little `experiments` configuration. See also: #1884.
|
||||
@@ -1 +0,0 @@
|
||||
Fixed the experiments implementation in #2517 not properly disabling some functionality when associated experiments weren't enabled.
|
||||
@@ -1 +0,0 @@
|
||||
The sticky events feature flag is correctly advertised in `/_matrix/client/versions` again after it was accidentally removed in #2517.
|
||||
@@ -1 +0,0 @@
|
||||
The former configuration alias `allow_check_for_updates` is now explicitly deprecated in favor of `allow_announcements_check`. Additionally, `request_ip_source` is now deprecated in favor of `accepted_ip_sources`.
|
||||
@@ -1 +0,0 @@
|
||||
A message is now sent to the admin room when a user logs in for the first time through an OIDC provider, if admin room notices are enabled. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Dropped support for `hardened_malloc` and add support for `mimalloc` instead. Contributed by @nex and @jade.
|
||||
@@ -1 +0,0 @@
|
||||
Fix soundness and correctness issues in the jemalloc interface, improving performance. Contributed by @Jade
|
||||
@@ -1 +0,0 @@
|
||||
Modernised the room knocking helper functions to make them match the behaviour of our room join helpers, which are safer and more efficient. This also fixes a bug that caused an error when knocking on rooms not local to the server. Contributed by @nex.
|
||||
@@ -1 +0,0 @@
|
||||
Network issues while refreshing an access token will no longer cause OAuth-compatible clients to be forcibly logged out. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Continuwuity will now request the `profile` OIDC scope from identity providers by default to improve compatibility with identity providers that require it to access users' profile claims, as recommended by the OIDC specification. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Attempting to start a UIAA session on a homeserver with UIAA disabled will now return `403 M_UNAUTHORIZED` instead of `404 M_UNSUPPORTED`. Contributed by @ginger.
|
||||
@@ -1 +0,0 @@
|
||||
Advertise support for Matrix v1.6. Contributed by @jade
|
||||
@@ -1 +0,0 @@
|
||||
Moved the `jemalloc` feature out of `standard` (and `full`) into `default` so builders can more easily swap allocators. Builders using `--no-default-features` with the `full` or `standard` feature should now explicitly select an allocator (either `jemalloc` or `mimalloc`). Contributed by @Jade
|
||||
@@ -1 +0,0 @@
|
||||
Fixed `/get_missing_events` rejecting requests with more `earliest_events` than the `limit`. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Added opt-in OpenTelemetry metrics, exported over OTLP or scraped by Prometheus from `/_continuwuity/metrics`, and a Grafana dashboard. Contributed by @eleboucher.
|
||||
@@ -1 +0,0 @@
|
||||
Fix outgoing federation stalling after a sender worker panics. Contributed by @eleboucher.
|
||||
Generated
+18
-18
@@ -3,11 +3,11 @@
|
||||
"advisory-db": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1793979272,
|
||||
"narHash": "sha256-oUcBtPbtS7PlEMuSrgTAN4wv49cXYbwKbQqhH2pah5w=",
|
||||
"lastModified": 1796043679,
|
||||
"narHash": "sha256-MvDGcGERqgMRLKEWeciLEFB4iJxUf6CoYF/7Ex+Hbqw=",
|
||||
"owner": "rustsec",
|
||||
"repo": "advisory-db",
|
||||
"rev": "309392b18f6b17022f82c701f300433126901068",
|
||||
"rev": "8cfccd2c20916f01964332b40623bc7cb8e1f211",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -18,11 +18,11 @@
|
||||
},
|
||||
"crane": {
|
||||
"locked": {
|
||||
"lastModified": 1793836618,
|
||||
"narHash": "sha256-TREenflwEjxOSq292FYwbc3kEm7TDRtXCZRNWEdjBmg=",
|
||||
"lastModified": 1794962885,
|
||||
"narHash": "sha256-zrweT2tXbcWiJMACOhOr2eYFJKVa6g59ouRaZ3BS5Do=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "79fd63528501446749c09f08cad486a58c7d173e",
|
||||
"rev": "95e62def851e9d650f0eab63cb4f59a3306e20bd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -39,11 +39,11 @@
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1794142885,
|
||||
"narHash": "sha256-xWFSr7q8IerDAVRk4W7/CgTmi05hMy2qjZ0z3VYpOVk=",
|
||||
"lastModified": 1795965599,
|
||||
"narHash": "sha256-3NsqYX9ty0DEdwTUS4plUNC0yrTRD61jhWYqt2B2m8M=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "f7d416b5073152c7f2e4de1a28d1a4330dd30a26",
|
||||
"rev": "fed19e07073ae5abc0ca2a9f8e23581c7e9b0884",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -89,11 +89,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1794042290,
|
||||
"narHash": "sha256-ziZn2PvCJE5JEEpqTdxXwJpPB+L3YqoCpTAMCzyaP3U=",
|
||||
"lastModified": 1795911899,
|
||||
"narHash": "sha256-OKvZpNQnLc24N/vuklyiHDYmFT4ZQRb5b3Rovh1/Hkg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f4a03c008967841f2a0b3cb7c436fc6fc31671f6",
|
||||
"rev": "e713fda5ec9fad59317d86214b1ee646a11896ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -132,11 +132,11 @@
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1794096810,
|
||||
"narHash": "sha256-dWC+YtMX+cwH3e9ndiFB77ijTsKtO5I2OxfcvUY4j3k=",
|
||||
"lastModified": 1795770336,
|
||||
"narHash": "sha256-Im4O82izrAEn69fGbBe3/6q/7bGCXstELUz4PDnzqFM=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "03ae6be57aa063bb373f69eead3b8e15168a45d2",
|
||||
"rev": "efc6ca74690b36e0b13961537ce043db912363f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -153,11 +153,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1791885023,
|
||||
"narHash": "sha256-C3alQ2MEt0zVrUSho5NUDo3jmhbff72++bfwoqT9Omo=",
|
||||
"lastModified": 1795894162,
|
||||
"narHash": "sha256-gd/ELBtxxNGVD6f4pGBsQw3E/Yd6u0qfbZHT2E7NGvQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "0d6d739a833ba9a9c93034862e4a7b061a062a1c",
|
||||
"rev": "36bb2486e0426bb2b4bee60f62378aa45f8a74e2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
Generated
+6
-6
@@ -128,9 +128,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rsbuild/core": {
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.4.tgz",
|
||||
"integrity": "sha512-1P3nLh/uXOcNTJZxvymRzAmuz8SBiCqY2InliNxQTlS0mWtoXbrRBC/W7zfv3MATk/vPmzODAYoZ5oIULk3Ilg==",
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.6.tgz",
|
||||
"integrity": "sha512-IVuWh/0DO6XT8075eCAzxWIcVGA7c4xKggf/VEePq3yXqEiU302n6OVGD7uCxQwPaB4R9ViX4cAqalcQV/sxKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2228,9 +2228,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-markdown": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.2.4.tgz",
|
||||
"integrity": "sha512-aCsogoZ2Oz1EItAlC12A+/uGuzp+CWlDU0xZ3o5jbJaepLsOu2tlxpvHslnX5dRhspD1gxNVkBtYG0yMiIpXoQ==",
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.2.5.tgz",
|
||||
"integrity": "sha512-mxOMQQ8NgisvTarkSUqZwi6GmzNo490V932DpEK/0+OETIeVJBzq4QuMt45fqqcsF5EYMlJENjSSAZxh89VJsg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+52
-24
@@ -147,6 +147,33 @@ async fn create_invite(
|
||||
.server_in_room(services.globals.server_name(), &body.room_id)
|
||||
.await;
|
||||
if resident {
|
||||
// Make sure the invite is for the room we are in, then authorise it
|
||||
// against our current view of the room state.
|
||||
let create_event = services
|
||||
.rooms
|
||||
.state_accessor
|
||||
.room_state_get(&body.room_id, &StateEventType::RoomCreate, "")
|
||||
.await?;
|
||||
if create_event.event_id != create_event_id
|
||||
|| services.rooms.state.get_room_version(&body.room_id).await? != body.room_version
|
||||
{
|
||||
return Err!(Request(InvalidParam(
|
||||
"Invite does not match the room's create event or version."
|
||||
)));
|
||||
}
|
||||
|
||||
let invite_pdu = PduEvent::from_id_val(&body.event_id, signed_event.clone())?;
|
||||
if !services
|
||||
.rooms
|
||||
.event_handler
|
||||
.current_state_check_6(&invite_pdu, &room_version_rules, &create_event)
|
||||
.await?
|
||||
{
|
||||
return Err!(Request(Forbidden(
|
||||
"Invite is not authorised by the current room state."
|
||||
)));
|
||||
}
|
||||
|
||||
services
|
||||
.rooms
|
||||
.event_handler
|
||||
@@ -174,10 +201,31 @@ async fn create_invite(
|
||||
.expect("must be able to create PDU object");
|
||||
invite_state.push(RawStrippedState::Pdu(serde_json::value::to_raw_value(&signed_event)?));
|
||||
|
||||
// If we are active in the room, the remote server will notify us about the
|
||||
// join/invite through /send. If we are not in the room, we need to manually
|
||||
// record the invited state for client /sync through update_membership(),
|
||||
// and send the invite PDU to the relevant appservices.
|
||||
// We always mark the room as invited, because we don't act on invites through /send
|
||||
services
|
||||
.rooms
|
||||
.state_cache
|
||||
.mark_as_invited(
|
||||
&recipient_user,
|
||||
&body.room_id,
|
||||
&sender_user,
|
||||
invite_state,
|
||||
body.via.clone(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
services
|
||||
.rooms
|
||||
.state_cache
|
||||
.update_joined_count(&body.room_id)
|
||||
.await;
|
||||
|
||||
services.sync.wake(&recipient_user).await;
|
||||
|
||||
// If we are active in the room, the remote server will send us the invite
|
||||
// through /send, which notifies pushers and appservices now that the invite
|
||||
// has been recorded. If we are not in the room, we need to manually send
|
||||
// the invite PDU to the relevant appservices.
|
||||
if !resident {
|
||||
// We will start by recording the room's create event as an outlier.
|
||||
// This will allow us to recognise it later in case the sender revokes
|
||||
@@ -190,26 +238,6 @@ async fn create_invite(
|
||||
.outlier
|
||||
.add_pdu_outlier(&create_event_id, create_event_json);
|
||||
|
||||
services
|
||||
.rooms
|
||||
.state_cache
|
||||
.mark_as_invited(
|
||||
&recipient_user,
|
||||
&body.room_id,
|
||||
&sender_user,
|
||||
invite_state,
|
||||
body.via.clone(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
services
|
||||
.rooms
|
||||
.state_cache
|
||||
.update_joined_count(&body.room_id)
|
||||
.await;
|
||||
|
||||
services.sync.wake(&recipient_user).await;
|
||||
|
||||
let matching_appservices: Vec<_> = services
|
||||
.appservice
|
||||
.read()
|
||||
|
||||
@@ -16,6 +16,7 @@ use ruma::{
|
||||
room::{
|
||||
join_rules::{JoinRule, RoomJoinRulesEventContent},
|
||||
member::{MembershipState, RoomMemberEventContent},
|
||||
power_levels::UserPowerLevel,
|
||||
},
|
||||
},
|
||||
int, room_id, uint, user_id,
|
||||
@@ -46,7 +47,7 @@ fn lexico_topo_sort(c: &mut test::Bencher) {
|
||||
|
||||
c.iter(|| {
|
||||
let _ = state_res::lexicographical_topological_sort(&graph, &|_| {
|
||||
future::ok((int!(0), MilliSecondsSinceUnixEpoch(uint!(0))))
|
||||
future::ok((UserPowerLevel::Int(int!(0)), MilliSecondsSinceUnixEpoch(uint!(0))))
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,10 +20,13 @@ use std::{
|
||||
|
||||
use futures::{Future, FutureExt, Stream, StreamExt, TryFutureExt, TryStreamExt, future};
|
||||
use ruma::{
|
||||
EventId, Int, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedUserId,
|
||||
EventId, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedUserId,
|
||||
events::{
|
||||
StateEventType, TimelineEventType,
|
||||
room::member::{MembershipState, RoomMemberEventContent},
|
||||
room::{
|
||||
member::{MembershipState, RoomMemberEventContent},
|
||||
power_levels::UserPowerLevel,
|
||||
},
|
||||
},
|
||||
int,
|
||||
room_version_rules::{RoomIdFormatVersion, RoomVersionRules, StateResolutionVersion},
|
||||
@@ -411,7 +414,7 @@ where
|
||||
.inspect(|(event_id, pl)| {
|
||||
debug!(
|
||||
event_id = event_id.as_str(),
|
||||
power_level = i64::from(*pl),
|
||||
power_level = ?pl,
|
||||
"found the power level of an event's sender",
|
||||
);
|
||||
})
|
||||
@@ -445,14 +448,14 @@ pub async fn lexicographical_topological_sort<Id, F, Fut, Hasher, S>(
|
||||
) -> Result<Vec<Id>>
|
||||
where
|
||||
F: Fn(Id) -> Fut + Sync,
|
||||
Fut: Future<Output = Result<(Int, MilliSecondsSinceUnixEpoch)>> + Send,
|
||||
Fut: Future<Output = Result<(UserPowerLevel, MilliSecondsSinceUnixEpoch)>> + Send,
|
||||
Id: Borrow<EventId> + Clone + Eq + Hash + Ord + Send + Sync,
|
||||
Hasher: BuildHasher + Default + Clone + Send + Sync,
|
||||
S: BuildHasher + Clone + Send + Sync,
|
||||
{
|
||||
#[derive(PartialEq, Eq)]
|
||||
struct TieBreaker<'a, Id> {
|
||||
power_level: Int,
|
||||
power_level: UserPowerLevel,
|
||||
origin_server_ts: MilliSecondsSinceUnixEpoch,
|
||||
event_id: &'a Id,
|
||||
}
|
||||
@@ -569,7 +572,7 @@ async fn get_power_level_for_sender<E, F, Fut>(
|
||||
event_id: &EventId,
|
||||
room_version: &RoomVersionRules,
|
||||
fetch_event: &F,
|
||||
) -> serde_json::Result<Int>
|
||||
) -> serde_json::Result<UserPowerLevel>
|
||||
where
|
||||
F: Fn(OwnedEventId) -> Fut + Sync,
|
||||
Fut: Future<Output = Option<E>> + Send,
|
||||
@@ -578,7 +581,7 @@ where
|
||||
debug!("fetch event ({event_id}) senders power level");
|
||||
|
||||
let Some(event) = fetch_event(event_id.to_owned()).await else {
|
||||
return Ok(int!(0));
|
||||
return Ok(UserPowerLevel::Int(int!(0)));
|
||||
};
|
||||
|
||||
let auth_events: Vec<E> = event
|
||||
@@ -599,7 +602,7 @@ where
|
||||
.authorization
|
||||
.explicitly_privilege_room_creators
|
||||
{
|
||||
return Ok(Int::MAX);
|
||||
return Ok(UserPowerLevel::Infinite);
|
||||
}
|
||||
|
||||
let pl = auth_events
|
||||
@@ -609,16 +612,17 @@ where
|
||||
let content: PowerLevelsContentFields = match pl {
|
||||
// With no m.room.power_levels in scope the create event's defaults
|
||||
// apply, under which the room creator holds 100 and everyone else 0.
|
||||
| None => return Ok(if sender_is_creator { int!(100) } else { int!(0) }),
|
||||
| None =>
|
||||
return Ok(UserPowerLevel::Int(if sender_is_creator { int!(100) } else { int!(0) })),
|
||||
| Some(ev) => from_json_str(ev.content().get())?,
|
||||
};
|
||||
|
||||
if let Some(&user_level) = content.get_user_power(event.sender()) {
|
||||
debug!("found {} at power_level {user_level}", event.sender());
|
||||
return Ok(user_level);
|
||||
return Ok(UserPowerLevel::Int(user_level));
|
||||
}
|
||||
|
||||
Ok(content.users_default)
|
||||
Ok(UserPowerLevel::Int(content.users_default))
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -966,11 +970,14 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
// Reserve depth 0 for events with no mainline power-levels ancestor (spec
|
||||
// position ∞) so they always sort strictly before the oldest mainline
|
||||
// power-levels event (depth 1).
|
||||
let mainline_map: HashMap<_, _> = mainline
|
||||
.iter()
|
||||
.rev()
|
||||
.enumerate()
|
||||
.map(|(idx, eid)| ((*eid).clone(), idx))
|
||||
.map(|(idx, eid)| ((*eid).clone(), idx.saturating_add(1)))
|
||||
.collect();
|
||||
|
||||
let order_map: HashMap<_, _> = to_sort
|
||||
@@ -1135,7 +1142,10 @@ mod tests {
|
||||
MilliSecondsSinceUnixEpoch, OwnedEventId, RoomVersionId,
|
||||
events::{
|
||||
StateEventType, TimelineEventType,
|
||||
room::join_rules::{JoinRule, RoomJoinRulesEventContent},
|
||||
room::{
|
||||
join_rules::{JoinRule, RoomJoinRulesEventContent},
|
||||
power_levels::UserPowerLevel,
|
||||
},
|
||||
},
|
||||
int,
|
||||
room_version_rules::RoomVersionRules,
|
||||
@@ -1386,6 +1396,47 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn mainline_sort_orders_no_ancestor_before_oldest_power_level() {
|
||||
let mut events = INITIAL_EVENTS();
|
||||
let mut with_pl = to_pdu_event(
|
||||
"WITH_PL",
|
||||
alice(),
|
||||
TimelineEventType::RoomTopic,
|
||||
Some(""),
|
||||
to_raw_json_value(&json!({ "topic": "with pl" })).unwrap(),
|
||||
&["CREATE", "IPOWER", "IMA"],
|
||||
&["IMA"],
|
||||
);
|
||||
with_pl.origin_server_ts = uint!(50);
|
||||
|
||||
let mut no_pl = to_pdu_event(
|
||||
"NO_PL",
|
||||
alice(),
|
||||
TimelineEventType::RoomTopic,
|
||||
Some(""),
|
||||
to_raw_json_value(&json!({ "topic": "no pl" })).unwrap(),
|
||||
&["CREATE", "IMA"],
|
||||
&["IMA"],
|
||||
);
|
||||
no_pl.origin_server_ts = uint!(100);
|
||||
|
||||
let to_sort = [with_pl.event_id.clone(), no_pl.event_id.clone()];
|
||||
for event in [with_pl, no_pl] {
|
||||
events.insert(event.event_id.clone(), event);
|
||||
}
|
||||
let fetcher = |id: OwnedEventId| {
|
||||
let events = &events;
|
||||
async move { events.get(&id).cloned() }
|
||||
};
|
||||
|
||||
let sorted = super::mainline_sort(&to_sort, Some(event_id("IPOWER")), &fetcher)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(sorted, vec![event_id("NO_PL"), event_id("WITH_PL")]);
|
||||
}
|
||||
|
||||
/// Events at the start of a room have no `m.room.power_levels` in their
|
||||
/// auth events, so the sender's power for sort ordering comes from the
|
||||
/// create event instead.
|
||||
@@ -1426,7 +1477,11 @@ mod tests {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(power_level, int!(100), "the creator should sort with their default power");
|
||||
assert_eq!(
|
||||
power_level,
|
||||
UserPowerLevel::Int(int!(100)),
|
||||
"the creator should sort with their default power"
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
@@ -1476,14 +1531,83 @@ mod tests {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(alice_power, int!(100), "the content creator should sort with creator power");
|
||||
assert_eq!(
|
||||
alice_power,
|
||||
UserPowerLevel::Int(int!(100)),
|
||||
"the content creator should sort with creator power"
|
||||
);
|
||||
|
||||
let bob_power =
|
||||
super::get_power_level_for_sender(&event_id("IMB"), &RoomVersionRules::V6, &fetcher)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(bob_power, int!(0), "the create event's sender is not the creator");
|
||||
assert_eq!(
|
||||
bob_power,
|
||||
UserPowerLevel::Int(int!(0)),
|
||||
"the create event's sender is not the creator"
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn v12_creator_outranks_max_int_power_level() {
|
||||
use futures::future::ready;
|
||||
use ruma::Int;
|
||||
|
||||
let mut events = INITIAL_EVENTS();
|
||||
let max_pl = to_pdu_event(
|
||||
"MAX_PL",
|
||||
alice(),
|
||||
TimelineEventType::RoomPowerLevels,
|
||||
Some(""),
|
||||
to_raw_json_value(&json!({
|
||||
"users": {
|
||||
bob(): Int::MAX,
|
||||
},
|
||||
}))
|
||||
.unwrap(),
|
||||
&["CREATE", "IMA"],
|
||||
&["IMA"],
|
||||
);
|
||||
let mut bob_event = to_pdu_event(
|
||||
"BOB_EV",
|
||||
bob(),
|
||||
TimelineEventType::RoomJoinRules,
|
||||
Some(""),
|
||||
to_raw_json_value(&json!({ "join_rule": "invite" })).unwrap(),
|
||||
&["CREATE", "MAX_PL", "IMB"],
|
||||
&["MAX_PL"],
|
||||
);
|
||||
bob_event.origin_server_ts = uint!(50);
|
||||
|
||||
let mut alice_event = to_pdu_event(
|
||||
"ALICE_EV",
|
||||
alice(),
|
||||
TimelineEventType::RoomJoinRules,
|
||||
Some(""),
|
||||
to_raw_json_value(&json!({ "join_rule": "public" })).unwrap(),
|
||||
&["CREATE", "MAX_PL", "IMA"],
|
||||
&["MAX_PL"],
|
||||
);
|
||||
alice_event.origin_server_ts = uint!(100);
|
||||
|
||||
let conflicted = hashset![bob_event.event_id.clone(), alice_event.event_id.clone()];
|
||||
let to_sort = vec![bob_event.event_id.clone(), alice_event.event_id.clone()];
|
||||
for event in [max_pl, bob_event, alice_event] {
|
||||
events.insert(event.event_id.clone(), event);
|
||||
}
|
||||
let fetcher = |id: OwnedEventId| ready(events.get(&id).cloned());
|
||||
|
||||
let sorted = super::reverse_topological_power_sort(
|
||||
to_sort,
|
||||
&conflicted,
|
||||
&RoomVersionRules::V12,
|
||||
&fetcher,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(sorted, vec![event_id("ALICE_EV"), event_id("BOB_EV")]);
|
||||
}
|
||||
|
||||
async fn test_event_sort() {
|
||||
@@ -1951,7 +2075,7 @@ mod tests {
|
||||
};
|
||||
|
||||
let res = super::lexicographical_topological_sort(&graph, &|_id| async {
|
||||
Ok((int!(0), MilliSecondsSinceUnixEpoch(uint!(0))))
|
||||
Ok((UserPowerLevel::Int(int!(0)), MilliSecondsSinceUnixEpoch(uint!(0))))
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -13,6 +13,7 @@ use ruma::{
|
||||
room::{
|
||||
join_rules::{JoinRule, RoomJoinRulesEventContent},
|
||||
member::{MembershipState, RoomMemberEventContent},
|
||||
power_levels::UserPowerLevel,
|
||||
},
|
||||
},
|
||||
int, room_id,
|
||||
@@ -89,7 +90,7 @@ pub(crate) async fn do_check(
|
||||
// Resolve the current state and add it to the state_at_event map then
|
||||
// continue on in "time"
|
||||
for node in super::lexicographical_topological_sort(&graph, &|_id| async {
|
||||
Ok((int!(0), MilliSecondsSinceUnixEpoch(uint!(0))))
|
||||
Ok((UserPowerLevel::Int(int!(0)), MilliSecondsSinceUnixEpoch(uint!(0))))
|
||||
})
|
||||
.await
|
||||
.unwrap()
|
||||
|
||||
@@ -18,7 +18,7 @@ use ruma::{
|
||||
EndpointError, IncomingResponseExt, OutgoingRequest, OutgoingRequestExt,
|
||||
SupportedVersions,
|
||||
auth_scheme::{AuthScheme, NoAuthentication},
|
||||
error::Error as RumaError,
|
||||
error::{Error as RumaError, ErrorKind},
|
||||
federation::authentication::{ServerSignatures, XMatrixSigningInput},
|
||||
path_builder::PathBuilder,
|
||||
},
|
||||
@@ -351,10 +351,29 @@ async fn into_http_response(
|
||||
debug!("Got {status:?} for {method} {url}");
|
||||
if !status.is_success() {
|
||||
let (parts, body) = http_response.into_parts();
|
||||
return Err(Error::Federation(
|
||||
dest.to_owned(),
|
||||
RumaError::from_http_response(http::Response::from_parts(parts, body.as_ref())),
|
||||
));
|
||||
let parsed_err =
|
||||
RumaError::from_http_response(http::Response::from_parts(parts, body.as_ref()));
|
||||
// Refuse to serve any error codes that shouldn't appear over
|
||||
// federation.
|
||||
match parsed_err.error_kind().unwrap_or(&ErrorKind::Unknown) {
|
||||
| ErrorKind::UnknownToken(_)
|
||||
| ErrorKind::MissingToken
|
||||
| ErrorKind::UnknownDevice
|
||||
| ErrorKind::UnknownPos
|
||||
| ErrorKind::UserSuspended
|
||||
| ErrorKind::UserLocked
|
||||
| ErrorKind::ResourceLimitExceeded(_)
|
||||
| ErrorKind::UserLimitExceeded(_)
|
||||
| ErrorKind::UserDeactivated => {
|
||||
return Err!(Request(Unknown(warn!(
|
||||
%dest,
|
||||
?parsed_err,
|
||||
"Remote server {dest} returned an unexpected error: {parsed_err}"
|
||||
))));
|
||||
},
|
||||
| _ => {},
|
||||
}
|
||||
return Err(Error::Federation(dest.to_owned(), parsed_err));
|
||||
}
|
||||
|
||||
Ok(http_response)
|
||||
|
||||
Loaded 100 of 108 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user