mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-27 19:07:33 +00:00
Compare commits
59
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc7daefe5a | ||
|
|
eb9e09d53b | ||
|
|
ef24867786 | ||
|
|
6412a650a5 | ||
|
|
25464134d8 | ||
|
|
7bdfea0704 | ||
|
|
47828dd8c2 | ||
|
|
208a625163 | ||
|
|
f579859f22 | ||
|
|
6b0eebc553 | ||
|
|
6708912984 | ||
|
|
7eb8c408a2 | ||
|
|
b4b0c836aa | ||
|
|
b7a1e09447 | ||
|
|
01a0954310 | ||
|
|
3194987fa6 | ||
|
|
a31cbce31e | ||
|
|
5e971aef3c | ||
|
|
4692bd3372 | ||
|
|
4b1433cfcd | ||
|
|
952365ff13 | ||
|
|
23a1ebd1ba | ||
|
|
611ca82019 | ||
|
|
61f142a541 | ||
|
|
3896630859 | ||
|
|
7d31ba12c5 | ||
|
|
3dbd2706b0 | ||
|
|
0851e44140 | ||
|
|
6b49ffdbed | ||
|
|
0c2909e763 | ||
|
|
c2b52a9bec | ||
|
|
9e36290b65 | ||
|
|
9d13b2bbe8 | ||
|
|
48025f4e50 | ||
|
|
5c5c140e28 | ||
|
|
cd1129062a | ||
|
|
b1da456e96 | ||
|
|
4e0daf013d | ||
|
|
c2a6c34c78 | ||
|
|
bb5cc8091c | ||
|
|
e827cecc84 | ||
|
|
6139ed4b63 | ||
|
|
1afced5e01 | ||
|
|
43a811a8e7 | ||
|
|
f207273aae | ||
|
|
c7bf5fca04 | ||
|
|
d4d72c0b9e | ||
|
|
18c1ce48e2 | ||
|
|
74338f939a | ||
|
|
fcd56abbcf | ||
|
|
09397a157b | ||
|
|
515758955c | ||
|
|
8205455ec5 | ||
|
|
70d16a3fdf | ||
|
|
9761fe7b2d | ||
|
|
ff8bf9b260 | ||
|
|
2c79a67130 | ||
|
|
8b9000cdf4 | ||
|
|
370fa43b5a |
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@ab49d3c64680143e184118bed66a46419fc15519 # v2
|
||||
uses: https://github.com/taiki-e/install-action@fe3acb53a98b62c772db35de75ce0e4595e7ca8c # v2
|
||||
with:
|
||||
tool: git-warp-time,timelord-cli@3.0.1
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ jobs:
|
||||
docs:
|
||||
name: Build and Deploy Documentation
|
||||
runs-on: ubuntu-latest
|
||||
if: secrets.CLOUDFLARE_API_TOKEN != ''
|
||||
|
||||
steps:
|
||||
- name: Sync repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
@@ -30,6 +28,14 @@ jobs:
|
||||
id: runner-env
|
||||
uses: https://forgejo.ellis.link/continuwuation/detect-versions@d39555789fed25b8eb8e086d9f199c514dfa311e # v1
|
||||
|
||||
- name: Setup Go
|
||||
if: steps.runner-env.outputs.go_minor == '' || steps.runner-env.outputs.go_minor < '27'
|
||||
uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
|
||||
with:
|
||||
go-version: '1.27'
|
||||
go-version-file: 'go.mod'
|
||||
cache-dependency-path: 'go.sum'
|
||||
|
||||
- name: Setup Node.js
|
||||
if: steps.runner-env.outputs.node_major == '' || steps.runner-env.outputs.node_major < '20'
|
||||
uses: https://github.com/actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
@@ -45,35 +51,33 @@ jobs:
|
||||
continuwuity-rspress-${{ steps.runner-env.outputs.slug }}-${{ steps.runner-env.outputs.arch }}-node-${{ steps.runner-env.outputs.node_version }}-
|
||||
continuwuity-rspress-${{ steps.runner-env.outputs.slug }}-${{ steps.runner-env.outputs.arch }}-node-
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install Rspress and dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build Rspress documentation
|
||||
- name: Build documentation with Rspress
|
||||
env:
|
||||
SITE_PATH: ${{ github.ref != 'refs/heads/main' && format('/pr/{0}/', '${{ forgejo.event.number }}') || '/' }}
|
||||
SITE_PATH: ${{ github.ref != 'refs/heads/main' && format('/@{0}/', forgejo.event.number) || '/' }}
|
||||
run: npm run docs:build
|
||||
|
||||
- name: Install Wrangler
|
||||
run: npm install --save-dev wrangler@latest
|
||||
|
||||
- name: Deploy to Cloudflare Pages (Production)
|
||||
if: github.ref == 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != ''
|
||||
uses: https://github.com/cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4
|
||||
with:
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
command: pages deploy ./doc_build --branch="main" --commit-dirty=true --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}"
|
||||
- name: Deploy to Grebedoc (Production)
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
go tool git-pages-cli https://continuwuity.org \
|
||||
--server grebedoc.dev \
|
||||
--token "${{ forgejo.token }}" \
|
||||
--upload-dir doc_build \
|
||||
--pretty-urls \
|
||||
--comment "${{ forgejo.sha }}" \
|
||||
--verbose
|
||||
|
||||
- name: Deploy to Grebedoc (Preview)
|
||||
if: github.ref != 'refs/heads/main'
|
||||
uses: actions/git-pages@v2
|
||||
with:
|
||||
site: https://preview.continuwuity.org
|
||||
path: "pr/${{ forgejo.event.number }}"
|
||||
server: grebedoc.dev
|
||||
token: ${{ forgejo.token }}
|
||||
source: doc_build/
|
||||
strict: true
|
||||
pretty-urls: true
|
||||
expires: 14
|
||||
comment: ${{ forgejo.sha }}
|
||||
run: |
|
||||
go tool git-pages-cli https://preview.continuwuity.org/@${{ forgejo.event.number }} \
|
||||
--server grebedoc.dev \
|
||||
--token "${{ forgejo.token }}" \
|
||||
--upload-dir doc_build \
|
||||
--pretty-urls \
|
||||
--expires 14 \
|
||||
--comment "${{ forgejo.sha }}" \
|
||||
--verbose
|
||||
+101
@@ -1,3 +1,104 @@
|
||||
# Continuwuity v26.11.0-rc.1 (2026-11-27)
|
||||
|
||||
## 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)
|
||||
- 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))
|
||||
- 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.
|
||||
- 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-alpha.2 (2026-11-14)
|
||||
|
||||
## Features
|
||||
|
||||
Generated
+12
-12
@@ -871,7 +871,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"conduwuit_build_metadata",
|
||||
@@ -903,7 +903,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_admin"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"conduwuit_api",
|
||||
@@ -927,7 +927,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_api"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"base64 0.23.1",
|
||||
@@ -960,7 +960,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_build_metadata"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"built",
|
||||
"cargo_metadata",
|
||||
@@ -968,7 +968,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_core"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"argon2",
|
||||
"arrayvec",
|
||||
@@ -1038,7 +1038,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_database"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"conduwuit_core",
|
||||
@@ -1058,7 +1058,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_macros"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"itertools 0.15.0",
|
||||
"proc-macro2",
|
||||
@@ -1068,7 +1068,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_router"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-server",
|
||||
@@ -1101,7 +1101,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_service"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"askama",
|
||||
"assign",
|
||||
@@ -1158,7 +1158,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "conduwuit_web"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"askama",
|
||||
"async-trait",
|
||||
@@ -5185,7 +5185,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruminuwuity"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"assign",
|
||||
"http",
|
||||
@@ -7368,7 +7368,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "xtask"
|
||||
version = "26.11.0-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
dependencies = [
|
||||
"askama",
|
||||
"cargo_metadata",
|
||||
|
||||
+1
-1
@@ -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-alpha.2"
|
||||
version = "26.11.0-rc.1"
|
||||
|
||||
[workspace.metadata.crane]
|
||||
name = "conduwuit"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Added support for acting as a trusted server, meaning the `trusted_servers` list can consist of servers that are either Synapse OR continuwuity.
|
||||
@@ -0,0 +1 @@
|
||||
Network issues while refreshing an access token will no longer cause OAuth-compatible clients to be forcibly logged out. Contributed by @ginger.
|
||||
@@ -0,0 +1 @@
|
||||
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
|
||||
+18
-5
@@ -1043,10 +1043,7 @@
|
||||
# (trusted key notary servers), as well as serve as trusted servers for
|
||||
# other operations like backfill and event fetching.
|
||||
#
|
||||
# Currently, continuwuity doesn't support inbound key requests, so
|
||||
# this list should only contain other Synapse servers.
|
||||
#
|
||||
# example: ["matrix.org", "starstruck.systems"]
|
||||
# example: ["continuwuity.org", "matrix.org"]
|
||||
#
|
||||
# It is possible to restrict which signing keys trusted servers are
|
||||
# allowed to sign responses with. Without configuring this, all responses
|
||||
@@ -1084,7 +1081,7 @@
|
||||
# is discouraged for performance and reliability reasons.
|
||||
#
|
||||
# env: CONTINUWUITY_TRUSTED_SERVERS
|
||||
#trusted_servers = ["matrix.org"]
|
||||
#trusted_servers = ["continuwuity.org", "continuwuity.rocks", "matrix.org"]
|
||||
|
||||
# Whether to prioritise trusted server lookups over origin server lookups.
|
||||
#
|
||||
@@ -2783,6 +2780,22 @@
|
||||
# env: CONTINUWUITY_EXPERIMENTS__MSC4494
|
||||
#msc4494 = false
|
||||
|
||||
# MSC4556: Notary request limits
|
||||
#
|
||||
# Creates a new key notary server route that has stricter limits on how
|
||||
# many signing keys can be requested in one query, to avoid a resource
|
||||
# exhaustion exploit vector in the existing key notary endpoint.
|
||||
#
|
||||
# Continuwuity mitigates the exploit vector in the old notary endpoint
|
||||
# anyway, so you do not need to enable this to be protected.
|
||||
#
|
||||
# Requires that remote servers support this MSC before it does anything.
|
||||
#
|
||||
# https://github.com/matrix-org/matrix-spec-proposals/pull/4556
|
||||
#
|
||||
# env: CONTINUWUITY_EXPERIMENTS__MSC4556
|
||||
#msc4556 = false
|
||||
|
||||
# MSC4560: Stripped state requests over federation
|
||||
#
|
||||
# Implements a more efficient way for servers to acquire and serve
|
||||
|
||||
+4
-4
@@ -167,8 +167,8 @@ ARG RUST_PROFILE=release
|
||||
ARG CARGO_FEATURES="default"
|
||||
|
||||
# Build the binary
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db \
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db,sharing=locked \
|
||||
--mount=type=cache,target=/app/target,id=continuwuity-cargo-target-${TARGET_CPU}-${TARGETPLATFORM}-${RUST_PROFILE} \
|
||||
bash <<'EOF'
|
||||
set -euo pipefail
|
||||
@@ -205,8 +205,8 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
EOF
|
||||
|
||||
# Generate Software Bill of Materials (SBOM)
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db \
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db,sharing=locked \
|
||||
bash <<'EOF'
|
||||
set -euo pipefail
|
||||
set -o xtrace
|
||||
|
||||
@@ -120,8 +120,8 @@ ENV CONTINUWUITY_VERSION_EXTRA=$CONTINUWUITY_VERSION_EXTRA
|
||||
ARG RUST_PROFILE=release
|
||||
|
||||
# Build the binary
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db \
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db,sharing=locked \
|
||||
--mount=type=cache,target=/app/target,id=continuwuity-cargo-target-${TARGET_CPU}-${TARGETPLATFORM}-musl-${RUST_PROFILE} \
|
||||
bash <<'EOF'
|
||||
set -o allexport
|
||||
@@ -143,8 +143,8 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
EOF
|
||||
|
||||
# Generate Software Bill of Materials (SBOM)
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db \
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db,sharing=locked \
|
||||
bash <<'EOF'
|
||||
set -o xtrace
|
||||
mkdir /out/sbom
|
||||
|
||||
@@ -90,6 +90,13 @@ Our source code and mirrors can be accessed through these buttons:
|
||||
|
||||
</div>
|
||||
|
||||
Our documentation is proudly hosted on Grebedoc.
|
||||
<div className="no-zoom" align="center">
|
||||
<a href="https://grebedoc.dev">
|
||||
<img src="https://grebedoc.dev/88x31-homu.gif" alt="served by Grebedoc" style={{imageRendering:"pixelated"}}/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
[forge-badge]: https://img.shields.io/badge/Ellis%20Git-main+packages-green?style=flat&logo=forgejo&labelColor=fff
|
||||
[forge-link]: https://forgejo.ellis.link/continuwuation/continuwuity
|
||||
[forge-releases-badge]: https://forgejo.ellis.link/continuwuation/continuwuity/badges/release.svg?style=flat&label=Latest%20release&labelColor=fff&color=green
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/.well-known/matrix/*
|
||||
Access-Control-Allow-Origin: *
|
||||
Content-Type: application/json
|
||||
/.well-known/continuwuity/*
|
||||
Access-Control-Allow-Origin: *
|
||||
Content-Type: application/json
|
||||
@@ -0,0 +1,18 @@
|
||||
module forgejo.ellis.link/continuwuation/continuwuity
|
||||
|
||||
go 1.27
|
||||
|
||||
toolchain go1.27.4
|
||||
|
||||
tool codeberg.org/git-pages/git-pages-cli
|
||||
|
||||
require (
|
||||
codeberg.org/git-pages/git-pages-cli v1.13.2 // indirect
|
||||
codeberg.org/git-pages/go-redirects v1.0.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/klauspost/compress v1.20.4 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/spf13/pflag v1.1.0 // indirect
|
||||
golang.org/x/net v0.62.0 // indirect
|
||||
golang.org/x/text v0.43.0 // indirect
|
||||
)
|
||||
@@ -0,0 +1,26 @@
|
||||
codeberg.org/git-pages/git-pages-cli v1.13.2 h1:ZEp6q939eTmB4GcZgnPQVm4Ml2BFaF2GOJgpCNhSha8=
|
||||
codeberg.org/git-pages/git-pages-cli v1.13.2/go.mod h1:hWoewK332MgUQuOMt5O07lFTjs3l3kUywxIFs90W3IY=
|
||||
codeberg.org/git-pages/go-redirects v1.0.0 h1:RfrPwtk60ii5JyQgH1XkUmsUrTqPjwvbqy3CGapPVwA=
|
||||
codeberg.org/git-pages/go-redirects v1.0.0/go.mod h1:0zdliclTux3tFONB7E6ZWV7WoWrK7cXHIi2hrMcLf8g=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/klauspost/compress v1.20.4 h1:dD0v/bvxtjCBqQu6sx1TNWkalEY5lNTIe+HY9w8TeNI=
|
||||
github.com/klauspost/compress v1.20.4/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/spf13/pflag v1.1.0 h1:6W6MbVUrnMb8PEhjkqwsVLY7ryuzRfFHF4mQd7L94ag=
|
||||
github.com/spf13/pflag v1.1.0/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk=
|
||||
github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk=
|
||||
golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY=
|
||||
golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI=
|
||||
golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc=
|
||||
golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
+2
-8
@@ -16,10 +16,7 @@
|
||||
pkgs.nodejs
|
||||
pkgs.pkg-config
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
|
||||
pkgs.liburing
|
||||
pkgs.rust-jemalloc-sys-unprefixed
|
||||
];
|
||||
++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.liburing;
|
||||
|
||||
env = {
|
||||
LIBCLANG_PATH = lib.makeLibraryPath [ pkgs.llvmPackages.libclang.lib ];
|
||||
@@ -28,10 +25,7 @@
|
||||
pkgs.stdenv.cc.cc.lib
|
||||
pkgs.llvmPackages.libclang.lib
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
|
||||
pkgs.liburing
|
||||
pkgs.jemalloc
|
||||
]
|
||||
++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.liburing
|
||||
);
|
||||
}
|
||||
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
|
||||
+20
-29
@@ -1,36 +1,27 @@
|
||||
{
|
||||
# stdenv,
|
||||
# enableJemalloc ? stdenv.hostPlatform.isLinux,
|
||||
enableJemalloc ? false,
|
||||
rocksdb,
|
||||
fetchFromGitea,
|
||||
rust-jemalloc-sys-unprefixed,
|
||||
...
|
||||
}:
|
||||
(rocksdb.override {
|
||||
# rocksdb fails to build with prefixed jemalloc, which is required on
|
||||
# darwin due to [1]. In this case, fall back to building rocksdb with
|
||||
# libc malloc. This should not cause conflicts, because all of the
|
||||
# jemalloc symbols are prefixed.
|
||||
#
|
||||
# [1]: https://github.com/tikv/jemallocator/blob/ab0676d77e81268cd09b059260c75b38dbef2d51/jemalloc-sys/src/env.rs#L17
|
||||
jemalloc = rust-jemalloc-sys-unprefixed;
|
||||
inherit enableJemalloc;
|
||||
}).overrideAttrs
|
||||
({
|
||||
version = "continuwuity-v0.5.0-unstable-2026-11-08";
|
||||
src = fetchFromGitea {
|
||||
domain = "forgejo.ellis.link";
|
||||
owner = "continuwuation";
|
||||
repo = "rocksdb";
|
||||
rev = "722fa3219df4169610fda8962221a1ff74026fdb";
|
||||
hash = "sha256-ZuXXp83Hgj0B5v499CNxa9oNQUS/ZKYOAZEhmarUifc=";
|
||||
};
|
||||
# RocksDB is built without jemalloc integration (the nixpkgs default). On Linux
|
||||
# it still uses jemalloc at runtime, because continuwuity statically links an
|
||||
# unprefixed jemalloc that replaces malloc/free process-wide. Linking RocksDB
|
||||
# against a separate jemalloc puts two allocator instances in one process, which
|
||||
# caused segfaults on db close/migration.
|
||||
rocksdb.overrideAttrs ({
|
||||
version = "continuwuity-v0.5.0-unstable-2026-11-08";
|
||||
src = fetchFromGitea {
|
||||
domain = "forgejo.ellis.link";
|
||||
owner = "continuwuation";
|
||||
repo = "rocksdb";
|
||||
rev = "722fa3219df4169610fda8962221a1ff74026fdb";
|
||||
hash = "sha256-ZuXXp83Hgj0B5v499CNxa9oNQUS/ZKYOAZEhmarUifc=";
|
||||
};
|
||||
|
||||
# We have this already at https://forgejo.ellis.link/continuwuation/rocksdb/commit/a935c0273e1ba44eacf88ce3685a9b9831486155
|
||||
# Unsetting `patches` so we don't have to revert it and make this nix exclusive
|
||||
patches = [ ];
|
||||
# We have this already at https://forgejo.ellis.link/continuwuation/rocksdb/commit/a935c0273e1ba44eacf88ce3685a9b9831486155
|
||||
# Unsetting `patches` so we don't have to revert it and make this nix exclusive
|
||||
patches = [ ];
|
||||
|
||||
# Unset postPatch, as our version override breaks version-specific sed calls in the original package
|
||||
postPatch = "";
|
||||
})
|
||||
# Unset postPatch, as our version override breaks version-specific sed calls in the original package
|
||||
postPatch = "";
|
||||
})
|
||||
Generated
+201
-146
@@ -128,13 +128,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rsbuild/core": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.3.tgz",
|
||||
"integrity": "sha512-IdbBXZrIY16RxnQduXRrsRBQtJ/X7JkYESrk6D46WA918wrckYTBxE09vHvDxR+3JoCLE02vOm2NPBNxqaUw5A==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.4.tgz",
|
||||
"integrity": "sha512-1P3nLh/uXOcNTJZxvymRzAmuz8SBiCqY2InliNxQTlS0mWtoXbrRBC/W7zfv3MATk/vPmzODAYoZ5oIULk3Ilg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rspack/core": "~2.3.3",
|
||||
"@rspack/core": "~2.3.4",
|
||||
"@swc/helpers": "^0.5.24"
|
||||
},
|
||||
"bin": {
|
||||
@@ -172,32 +172,32 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.3.tgz",
|
||||
"integrity": "sha512-wwF++36a3rqYi0G9zj+rUavn/GIMzbzXehelGS1jkYeKPHyPXrVYwRHqwEKNKMD9z+FdW4YJKQcfFkPlHEiwUg==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.4.tgz",
|
||||
"integrity": "sha512-wSOT16LVITL/IKeIiLXgN5Q5jZIDqnQ7Gmk+wzKOSZ6OHYNfEBXAKhSJuYtCBq8ovJuGl8cJjdqatAlHE5XKIA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optionalDependencies": {
|
||||
"@rspack/binding-darwin-arm64": "2.3.3",
|
||||
"@rspack/binding-darwin-x64": "2.3.3",
|
||||
"@rspack/binding-linux-arm64-gnu": "2.3.3",
|
||||
"@rspack/binding-linux-arm64-musl": "2.3.3",
|
||||
"@rspack/binding-linux-ppc64-gnu": "2.3.3",
|
||||
"@rspack/binding-linux-riscv64-gnu": "2.3.3",
|
||||
"@rspack/binding-linux-riscv64-musl": "2.3.3",
|
||||
"@rspack/binding-linux-s390x-gnu": "2.3.3",
|
||||
"@rspack/binding-linux-x64-gnu": "2.3.3",
|
||||
"@rspack/binding-linux-x64-musl": "2.3.3",
|
||||
"@rspack/binding-wasm32-wasi": "2.3.3",
|
||||
"@rspack/binding-win32-arm64-msvc": "2.3.3",
|
||||
"@rspack/binding-win32-ia32-msvc": "2.3.3",
|
||||
"@rspack/binding-win32-x64-msvc": "2.3.3"
|
||||
"@rspack/binding-darwin-arm64": "2.3.4",
|
||||
"@rspack/binding-darwin-x64": "2.3.4",
|
||||
"@rspack/binding-linux-arm64-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-arm64-musl": "2.3.4",
|
||||
"@rspack/binding-linux-ppc64-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-riscv64-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-riscv64-musl": "2.3.4",
|
||||
"@rspack/binding-linux-s390x-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-x64-gnu": "2.3.4",
|
||||
"@rspack/binding-linux-x64-musl": "2.3.4",
|
||||
"@rspack/binding-wasm32-wasi": "2.3.4",
|
||||
"@rspack/binding-win32-arm64-msvc": "2.3.4",
|
||||
"@rspack/binding-win32-ia32-msvc": "2.3.4",
|
||||
"@rspack/binding-win32-x64-msvc": "2.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-darwin-arm64": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.3.tgz",
|
||||
"integrity": "sha512-G9WcBOP/6ZWeqTM/G0/rkJRY4DWmYQvk2untzcpj92uO12tqjZ9BSMgtBFvwElwagfQBkX8PPutkAZgtnlAoWA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.4.tgz",
|
||||
"integrity": "sha512-eBD71fbmoJKnxcHD03bukbAIOP5r7nD0Ehs+mUrUQlZ6N53EhuJsTeJ1oYdg5L4GoSeQ+KecCqME81Nm0COLrA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -209,9 +209,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-darwin-x64": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.3.tgz",
|
||||
"integrity": "sha512-6agI5XDoihay+84vzZgIwwpQQ3xBWbe2HTWBRc0n42LzynIj9h7Qv8CJzf1gSDV1Ts0jzDgAJCYUFJ6Ya5F6MA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.4.tgz",
|
||||
"integrity": "sha512-CqdfzTLPVFQCniOy/GDVWbg+rqg31qfdzbFf8NYCzdDkCQg+p15hU2HsckD/1sLsaNB8Y55EjGz4ZyGDny0cHg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -223,13 +223,16 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-arm64-gnu": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.3.tgz",
|
||||
"integrity": "sha512-VdjK1mDq+GBexd041lmWBFmAvcWIZy7kepTJbJgxLeHYYOnI3KmBG15kemhlK0pBySa+bePX7p2w8uYtl1HsCA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-T/Y1FYiSegcNc+oHuDOLRGIcc+eSdBnfbS70d51EWQj4+0TG/tlfuqFKeAIL3mnKUV5lDLaTz3vsoD0Sws5Fxw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -237,13 +240,16 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-arm64-musl": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.3.tgz",
|
||||
"integrity": "sha512-xF4Wy4XwGjC3m13tFm1q9p9Qpm31qrk6f5zEMPZC31UVabb+2jrgTI1pfZ8IRuo9x/Qw9s+Zq3hyDbtJvvD8Pg==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.4.tgz",
|
||||
"integrity": "sha512-WZHCzZ532UfXFXNU8XyM8jb+I6wddegbs/7IXsyw7xiPwwZX1D/M6iKFVpBYdvKcupUM8bS8Uw2REirR/cERVw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -251,13 +257,16 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-ppc64-gnu": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.3.tgz",
|
||||
"integrity": "sha512-jVmn+LpF44D4FdZyT91rlT/tPMdHIfPfQTgVzwPB5nDICp4b57SFjVBApuAPIxnLT1pKLkv/LIcdvGSdAeX12w==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-WeizqeI6HIh7Ax9w2tlmpTtipJWxXcdgt3QqI3N9LOixymlMD5yMBMZNPqwZ6cHXT9gOQ69SvPcVgMwxsdmceQ==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -265,13 +274,16 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-riscv64-gnu": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.3.tgz",
|
||||
"integrity": "sha512-JcQJm8M634jkbG6zJ3TfziKYsCINEAh3FwKuxLljvBgGDEupBxPuB0n2bXBIUeI8P9C33B45IYX6BwWYXll/zw==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-h+001Vbq8LyGwPMNkeRWidPOVKwlAbwNPskY3CjNlSw3euHkVchfhM3uo6+1h0GyTtb3rzsWqsfm1kar7m/tiQ==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -279,13 +291,16 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-riscv64-musl": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.3.tgz",
|
||||
"integrity": "sha512-YMIOS7rFvCDnpeyxoVEVbM7U/TwcC2VDtN3Oiq9BenRsNTEvk0imINhuVRFanh15+wkiQHk9h0b+pzcggYLAsA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.4.tgz",
|
||||
"integrity": "sha512-S1rlaCnNVG5s4WZ9odLsqN3ySh5TEdNTLXWapEK8x3iQl56aLtdvqXTfbJWHWnYLJuS7M1WqnQGdJNdjy2NDsA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -293,13 +308,16 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-s390x-gnu": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.3.tgz",
|
||||
"integrity": "sha512-tHGtIG6GGHsk2KvSleQp/BrVqiGdjDsLJuMKR7hE7W1uJW6WDJ+a+Z23Rk5kHXh5BjeFLjXxcufGuokvmLmTag==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-0SkgGrgulVMam3xel5dMNKQ+U7BEpCczhF1avGT1DzDVIbMfIOsbb32gApQNSz0E7RfAQ/Pa5eWiA9oyRq7ZMQ==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -307,13 +325,16 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-x64-gnu": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.3.tgz",
|
||||
"integrity": "sha512-spe8SjywfO+dD7Sk+vIpPaOXf56wstrgeuztfJdiI9zTeQmf/lhdaNUUSUAXlGIaLjrN/PhV8i5kbQ7VaAkenw==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.4.tgz",
|
||||
"integrity": "sha512-q7E6x3rJJ/9fJyLuRe5+KyEPi23BF/xkAU4xCM5VwLkTf+rVyOkDZfu0qOkxmILjrxllQPV+b/ojBL/ZaIeQPw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -321,13 +342,16 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-x64-musl": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.3.tgz",
|
||||
"integrity": "sha512-4E4OJodrmsS52zkSAWShG/F07etr0OG4oSrIN+/2BBgc0qR2wwu2T+rAs308IL3lbywlS+J+cynrRcsSFMD+Kg==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.4.tgz",
|
||||
"integrity": "sha512-rey4Tyasui/WeMn6KfhH5xyZGOMt+Ny+GDK7nGh9TSz/cb3/bisxqGzpbu6GJK8leDmTUDD5ZdpODexytA5rzQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -335,9 +359,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-wasm32-wasi": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.3.tgz",
|
||||
"integrity": "sha512-AhlsPjW31TGP8N+J7OmbCPaamARUl+OQNiT3xo0PL5Dz5oMm+bEfYLostpehKyy8MNDrmJcY97M9pDb5MDMA0w==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.4.tgz",
|
||||
"integrity": "sha512-sDt2MSXZrIaMBa6UaEqmXEqebwpTOPAXLdo9CYJ2Fa9FJWP4TCYbn30mbvV38ZC2n5YX411DRbjck+s97CceIg==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
@@ -351,9 +375,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-arm64-msvc": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.3.tgz",
|
||||
"integrity": "sha512-Zqbj7GBPtkJ8GlUKAjFgvmOxKkQwjfS3XfjwGBcmoIAUb4IxUsmMqvi+gfKrvI45SjYVFZaJnTpOJw6GL79K+Q==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.4.tgz",
|
||||
"integrity": "sha512-24YC1YSodLAJ8VsMQJmJSHCNvHTqK9JP5hj50T50WE8lCHNsNl/rIYXO9V0VlCYT/HshE6EHHzAeKdahiEOtcw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -365,9 +389,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-ia32-msvc": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.3.tgz",
|
||||
"integrity": "sha512-sJJmbrdzH6kI48mCsUu5a2+BzEktLmHrHUmWGkAPAi0zhi4anA7sOdS1+uERbkkd/XAzs0bdn3JXyT2djY+3IA==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.4.tgz",
|
||||
"integrity": "sha512-xmUNu6kgV9lLEkRP1Zb+t6i1Z1ZMEWXmLlMalPx8tHqndz2RflNMBBx6kjB2nAPQBIZgWufwm7dVGS0HKomCmw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -379,9 +403,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-x64-msvc": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.3.tgz",
|
||||
"integrity": "sha512-1r3wxV1pBNykqpbEbZWqcrZd13PKLq0e7Ku6qv8IGKKeftuf3RUxTkeM5AzppGMGEIA9sw8mRdN7NvEXxqLLxw==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.4.tgz",
|
||||
"integrity": "sha512-WY+AkJqpbLtLEZiG1fE7CVJZ54y0qHeCiVmLxGBsh4OOGIDCs6v2Ub5COcPrYVzGJFGyeHUS29dV7JAs93qIHw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -393,13 +417,13 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rspack/core": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.3.tgz",
|
||||
"integrity": "sha512-stAYr0SXf+ZFXFsWTv+Ljxoj/nQs2p7gX9V1kBwlO2IXlRAAhabLONYibT3ZeEGybx3kowrs7uJkcOQsuHgghw==",
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.4.tgz",
|
||||
"integrity": "sha512-T8HGkIjPVDlGlIN8st/ICe8Gfixq8te75g/8crSdNSf8F+6884sBcKNky0CRdfPxao1C5SXV+Vjv1XJTjyu83w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rspack/binding": "2.3.3"
|
||||
"@rspack/binding": "2.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
@@ -418,9 +442,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/plugin-react-refresh": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/plugin-react-refresh/-/plugin-react-refresh-2.0.2.tgz",
|
||||
"integrity": "sha512-dGNZiCxQxgAUI9sah7gd8u+O7OJZRCmqtEJNDOd8xW5RqcieC86F7p5qcShyw6onH5pKf57evpr2VjGbaFGkZg==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/plugin-react-refresh/-/plugin-react-refresh-2.0.3.tgz",
|
||||
"integrity": "sha512-/K86+2fzdtGdqorm8IwxaouAr5uXFdn7yej0P6/JtuqVYEo9tAUMypGbepAZgt3ClVevn6sC8Oo+fUCLhR10zg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
@@ -683,9 +707,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz",
|
||||
"integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==",
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.11.tgz",
|
||||
"integrity": "sha512-YBdNe5JcjYR0sPhJW1QIeRCmI11YhYvaRuGCs9+WCeTTb+Yhb2BE2XMe5/wAqF10FK5g3+q1PDhQABfT7aX0gg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -734,9 +758,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "26.6.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz",
|
||||
"integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==",
|
||||
"version": "26.6.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.10.tgz",
|
||||
"integrity": "sha512-WJuPHoGB8WNQuTksNF7SOQpnH02PXeDYz4iueWbBT6/hTWnShY5F3T/hoJA3fY9+uYReDZ7pyTKKx83jQa7aGg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -744,9 +768,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "19.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz",
|
||||
"integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==",
|
||||
"version": "19.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.3.tgz",
|
||||
"integrity": "sha512-K8uWpJc4teiuOPdiP1umjeA9rGMgVPiXuoL66fcS1QlwBT1WMqY8PORmub9FadopIs+RCW6siYEs7Lpq+vDlog==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1108,13 +1132,13 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/@unhead/react": {
|
||||
"version": "2.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@unhead/react/-/react-2.1.17.tgz",
|
||||
"integrity": "sha512-KmcYksDjlLozL0fxUjIDwH/0k6+Lg2HWHLUPlkRW8Gl08hdB1AbLB5iU9QxFvkaT8p0Q4dFEqZWnz3g6RMeiRA==",
|
||||
"version": "2.1.19",
|
||||
"resolved": "https://registry.npmjs.org/@unhead/react/-/react-2.1.19.tgz",
|
||||
"integrity": "sha512-UNLxU5CgyJw6NzTOsxzUr11pX9zyW1DIHXPwkg2/V1zLcwPKPPcpDkx1tRmWmlajPdpSFZli3xmSrEt1HCGSDw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"unhead": "2.1.17"
|
||||
"unhead": "2.1.19"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/harlan-zw"
|
||||
@@ -1262,9 +1286,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/compute-scroll-into-view": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz",
|
||||
"integrity": "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==",
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.2.2.tgz",
|
||||
"integrity": "sha512-X+jf3y2j3TbtxA3fq3/kBNiSnD1QlIChiIQdAc2Yo1LtOc0yjO1TzgxWJf8PwtKPGgSvSfWUlVvrb7vGx1eYWA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -1293,9 +1317,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
|
||||
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz",
|
||||
"integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -1626,9 +1650,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/hast-util-raw": {
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.2.0.tgz",
|
||||
"integrity": "sha512-1zVq3M9AlZiBZ4mlMPnLtkK2rdd+I8VhmFLNLb//XJm6xA2AVH2tz19EHy25RgRWut6z6FpTARAs7P8rnmRJUQ==",
|
||||
"version": "9.2.1",
|
||||
"resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.2.1.tgz",
|
||||
"integrity": "sha512-8P0PLAr5C7xCRb+tkhUTV4v6OSNcnccKwjBkH/r19R5CkVCgTWlv4vmTkxFH1CVCA2UJOvOPQdBBMC3c6qnuOg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1639,7 +1663,7 @@
|
||||
"hast-util-to-parse5": "^8.0.0",
|
||||
"html-void-elements": "^3.0.0",
|
||||
"mdast-util-to-hast": "^13.0.0",
|
||||
"parse5": "^8.0.0",
|
||||
"parse5": "^8.1.0",
|
||||
"unist-util-position": "^5.0.0",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
"vfile": "^6.0.0",
|
||||
@@ -1681,9 +1705,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/hast-util-to-html": {
|
||||
"version": "9.0.6",
|
||||
"resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.6.tgz",
|
||||
"integrity": "sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA==",
|
||||
"version": "9.0.7",
|
||||
"resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.7.tgz",
|
||||
"integrity": "sha512-HYNDA3qdnzUPitY/LcQm1nWs8z0cWFNH1Nz09jdI/tXifAqF7h3+jrLl4S/b9Mi4VSjn0Dsn54ctuTV6zhBthA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1732,23 +1756,6 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/hast-util-to-jsx-runtime/node_modules/inline-style-parser": {
|
||||
"version": "0.2.9",
|
||||
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.9.tgz",
|
||||
"integrity": "sha512-IttN8BqKLxzUrnTqHI+/hwAJQItBAUjdoHERCDv+oOuX48VP6bzW8+QjOXSfoevzq3YrYAwX1uLHp8TqO9yIeg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/hast-util-to-jsx-runtime/node_modules/style-to-object": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-2.0.2.tgz",
|
||||
"integrity": "sha512-QmbXPUylqU80HAgTOJeEOdbA40W9KtxmjMhQy+tq+b8F2aoh3aQLuy82hh2jm2qsC9hR9eI0+eQidTMydKcqRA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"inline-style-parser": "0.2.9"
|
||||
}
|
||||
},
|
||||
"node_modules/hast-util-to-parse5": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.1.tgz",
|
||||
@@ -1833,6 +1840,13 @@
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/inline-style-parser": {
|
||||
"version": "0.2.9",
|
||||
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.9.tgz",
|
||||
"integrity": "sha512-IttN8BqKLxzUrnTqHI+/hwAJQItBAUjdoHERCDv+oOuX48VP6bzW8+QjOXSfoevzq3YrYAwX1uLHp8TqO9yIeg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/is-absolute-url": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz",
|
||||
@@ -1943,9 +1957,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-find-and-replace": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.4.tgz",
|
||||
"integrity": "sha512-z4B5c6jrnJ1ltOQemhWYPBSAo6y42Z8Gt2yEgfgNTMcLSU59B8bfj8Z8AnAlJrBGLnqkdAUZ7jdDEqQw3KuipQ==",
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.5.tgz",
|
||||
"integrity": "sha512-of3wZLEBWpK8mSYy8wmKnwyxfUKjhCkXxGLz45DVBqfcahTP37LscCK+0oAZh+ReZ5OunPDkB2zdGMIxrojLhw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2005,9 +2019,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-gfm-autolink-literal": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.1.0.tgz",
|
||||
"integrity": "sha512-Jx6QSK8wDo558Bcf7q+1pe0v81g2PVs09Hlvu9xJHmCFRF3sAPW7vXFVIAwBncs3sde92WbsVqNxwdqViA2XnQ==",
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.1.2.tgz",
|
||||
"integrity": "sha512-rAlbZBGZfv2YRr6lSFGHTN305KkNawOYRRlbldFyPHnTlHJZwlGdzVwyIDvr3fxbhRbmJOSZc06c8H5Fgfu8Ng==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2131,9 +2145,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-mdx-jsx": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.1.tgz",
|
||||
"integrity": "sha512-oXp1GIa+E9IwIs3a106+tr3Bz2MlTTBvlXjOZMoIat11kk7vjqgmBnksB9WHmWv+gZh7k3IUgpAHlwHB7DH4GQ==",
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.2.tgz",
|
||||
"integrity": "sha512-/0FHaZMv2fSjIL3z/NYmXnQTSdzYyamPpI1BXpSCngTUqpSvMNIlERa26ABz+Z6UFQbrh3I5Yhzp448WZsPfMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2190,9 +2204,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-hast": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz",
|
||||
"integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==",
|
||||
"version": "13.2.2",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.2.tgz",
|
||||
"integrity": "sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2212,9 +2226,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-markdown": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.2.3.tgz",
|
||||
"integrity": "sha512-dImdB6VZRMRac1SwAW6o1c0ESk/7pFFAMCMuKM+9v7LpTSthMM5nzXpqKw4Mjo66aXVKhNkyrP4bMB9MurPyWg==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3317,9 +3331,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "7.18.5",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.5.tgz",
|
||||
"integrity": "sha512-dTgvcXDOrLPrlLHrcZAqWveiK1hMSqN+rGAJzegP8HtmNkfRxOoshGWBNX3ZJ0cZjOHkRdlUJtaIhZMLLyGyPw==",
|
||||
"version": "7.18.7",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.7.tgz",
|
||||
"integrity": "sha512-nXl672FFobymVY/Ywbo0DnlXV/+VXOB5pOslCeuVqoegwwL7sau2yASdyGoWHvPRxAoqUBrAiFZRdli4nT7Wow==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3330,23 +3344,27 @@
|
||||
"node": ">=20.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": ">=18",
|
||||
"react": ">=18",
|
||||
"react-dom": ">=18"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "7.18.5",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.5.tgz",
|
||||
"integrity": "sha512-9HcfDMU6JJ/fp6gJZYGwNE6RknVGS4kBjH1HkNw959mCJi70TVwdipQWv2FEol9uGpi+SZTFtVpJPtEQfayeOw==",
|
||||
"version": "7.18.7",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.7.tgz",
|
||||
"integrity": "sha512-EBWBKV1TjvScebAIvidowN0Bfh9Bg7p54IDBRVJkFXz0wBKTBblDNLxUvCewx/GdzTiC7VWV/MOjWqsLWEMygA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"react-router": "7.18.5"
|
||||
"react-router": "7.18.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
@@ -3644,13 +3662,13 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/scroll-into-view-if-needed": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz",
|
||||
"integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.2.1.tgz",
|
||||
"integrity": "sha512-dgeJvJhSV9MY6hyhtsivbSxHoZVm+lumsWTObtUdAchJflwOGmKKHNkEpU8pVYMomZ8h/yrfzVQkcPlObQNDWQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"compute-scroll-into-view": "^3.0.2"
|
||||
"compute-scroll-into-view": "^3.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/set-cookie-parser": {
|
||||
@@ -3702,9 +3720,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/stringify-entities": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
|
||||
"integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==",
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.5.tgz",
|
||||
"integrity": "sha512-jNuI2fNNw5ecxrWmgm90R3iH0Kc/94AQwoQWoSUYphWzvmUA2pjFG34H56Z7Z3FkvH3FpYwwewKAa97oQnPFhw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3743,6 +3761,16 @@
|
||||
"inline-style-parser": "0.2.7"
|
||||
}
|
||||
},
|
||||
"node_modules/style-to-object": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-2.0.2.tgz",
|
||||
"integrity": "sha512-QmbXPUylqU80HAgTOJeEOdbA40W9KtxmjMhQy+tq+b8F2aoh3aQLuy82hh2jm2qsC9hR9eI0+eQidTMydKcqRA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"inline-style-parser": "0.2.9"
|
||||
}
|
||||
},
|
||||
"node_modules/toggle-selection": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
|
||||
@@ -3823,18 +3851,45 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/unhead": {
|
||||
"version": "2.1.17",
|
||||
"resolved": "https://registry.npmjs.org/unhead/-/unhead-2.1.17.tgz",
|
||||
"integrity": "sha512-HLMKXOszRhAPBrr6VlqCeVeJq2kbC4kXwzGLEZvvojPLWNYTJw22xG7Bfwhsvs31+IBet3Wl8ADg9dwYdyphfQ==",
|
||||
"version": "2.1.19",
|
||||
"resolved": "https://registry.npmjs.org/unhead/-/unhead-2.1.19.tgz",
|
||||
"integrity": "sha512-W+zxYQeulbi738I839IQFxOgdAzkNWLrNdaK0XmRGAqcDhojlFufESM7d/IeaMwPmue1rff27Sdl6NNckZqrrQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"hookable": "^6.0.1"
|
||||
"hookable": "^6.0.1",
|
||||
"parse5": "^7.3.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/harlan-zw"
|
||||
}
|
||||
},
|
||||
"node_modules/unhead/node_modules/entities": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz",
|
||||
"integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/unhead/node_modules/parse5": {
|
||||
"version": "7.3.0",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz",
|
||||
"integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"entities": "^6.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/unified": {
|
||||
"version": "11.0.5",
|
||||
"resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
"devDependencies": {
|
||||
"@rspress/core": "^2.0.0",
|
||||
"@rspress/plugin-client-redirects": "^2.0.0",
|
||||
"@types/node": "^26.6.6",
|
||||
"@types/node": "^26.6.7",
|
||||
"typescript": "^7.0.0"
|
||||
}
|
||||
}
|
||||
+10
-1
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:recommended", "replacements:all", ":semanticCommitTypeAll(chore)", "helpers:pinGitHubActionDigests"],
|
||||
"dependencyDashboard": true,
|
||||
"dependencyDashboard": {
|
||||
"enabled": true
|
||||
},
|
||||
"osvVulnerabilityAlerts": true,
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
@@ -90,6 +92,13 @@
|
||||
"matchUpdateTypes": ["patch"],
|
||||
"groupName": "node-patch-updates"
|
||||
},
|
||||
{
|
||||
"description": "Batch patch-level Go dependency updates",
|
||||
"matchManagers": ["gomod"],
|
||||
"matchUpdateTypes": ["patch"],
|
||||
"postUpdateOptions": ["gomodTidy"],
|
||||
"groupName": "go-patch-updates"
|
||||
},
|
||||
{
|
||||
"description": "Pin forgejo artifact actions to prevent breaking changes",
|
||||
"matchManagers": ["github-actions"],
|
||||
|
||||
@@ -79,6 +79,7 @@ export default defineConfig({
|
||||
enableContentAnimation: true,
|
||||
enableAppearanceAnimation: false,
|
||||
footer: {},
|
||||
darkMode: 'auto'
|
||||
},
|
||||
|
||||
plugins: [pluginClientRedirects({
|
||||
|
||||
@@ -28,7 +28,7 @@ use ruma::{
|
||||
},
|
||||
assign,
|
||||
};
|
||||
use service::users::DeviceToken;
|
||||
use service::users::{DeviceToken, PreviousTokenAction};
|
||||
|
||||
use crate::{Ruma, client_ip::ClientIp};
|
||||
|
||||
@@ -205,7 +205,7 @@ pub(crate) async fn login_route(
|
||||
let device_id = if let Some(existing_device_id) = existing_device_id {
|
||||
services
|
||||
.users
|
||||
.set_token(&user_id, &existing_device_id, token.clone())
|
||||
.set_token(&user_id, &existing_device_id, token.clone(), PreviousTokenAction::Clear)
|
||||
.await?;
|
||||
|
||||
existing_device_id
|
||||
|
||||
+6
-1
@@ -219,7 +219,9 @@ pub fn build(router: Router<State>, state: State) -> Router<State> {
|
||||
if config.allow_federation {
|
||||
router = router
|
||||
.ruma_route(&server::get_server_version_route)
|
||||
.route("/_matrix/key/v2/server", get(server::get_server_keys_route))
|
||||
.ruma_route(&server::get_server_keys_route)
|
||||
.ruma_route(&server::get_remote_server_keys_batch_route)
|
||||
.ruma_route(&server::get_remote_server_keys_route)
|
||||
.ruma_route(&server::get_public_rooms_route)
|
||||
.ruma_route(&server::get_public_rooms_filtered_route)
|
||||
.ruma_route(&server::send_transaction_message_route)
|
||||
@@ -246,6 +248,9 @@ pub fn build(router: Router<State>, state: State) -> Router<State> {
|
||||
.ruma_route(&server::get_content_route)
|
||||
.ruma_route(&server::get_content_thumbnail_route)
|
||||
.route("/_continuwuity/local_user_count", get(client::continuwuity_local_user_count));
|
||||
if config.experiments.msc4556.is_enabled() {
|
||||
router = router.ruma_route(&server::get_remote_server_keys_batch_v3_unstable_route);
|
||||
}
|
||||
if config.experiments.msc4560.is_enabled() {
|
||||
router = router.ruma_route(&server::get_stripped_state_route);
|
||||
}
|
||||
|
||||
+24
-6
@@ -319,6 +319,21 @@ async fn check_access_token(
|
||||
));
|
||||
}
|
||||
|
||||
let session_info = services
|
||||
.oauth
|
||||
.get_session_info_for_device(&sender_user, &sender_device)
|
||||
.await;
|
||||
|
||||
if session_info
|
||||
.as_ref()
|
||||
.is_some_and(service::oauth::SessionInfo::has_previous_refresh_token)
|
||||
{
|
||||
services
|
||||
.oauth
|
||||
.clear_previous_refresh_token(&sender_user, &sender_device)
|
||||
.await;
|
||||
}
|
||||
|
||||
// Locked users can only use /logout and /logout/all
|
||||
if services
|
||||
.users
|
||||
@@ -333,12 +348,6 @@ async fn check_access_token(
|
||||
}
|
||||
}
|
||||
|
||||
let session_info = services
|
||||
.oauth
|
||||
.get_session_info_for_device(&sender_user, &sender_device)
|
||||
.await
|
||||
.map(Box::new);
|
||||
|
||||
// Make sure the user has the right scopes to use the route
|
||||
let mut user_scopes = if let Some(session_info) = &session_info {
|
||||
session_info.scopes()
|
||||
@@ -416,6 +425,15 @@ async fn check_access_token(
|
||||
sender_device,
|
||||
appservice_info: Box::new(appservice_info),
|
||||
})
|
||||
} else if services.users.is_previous_token(token).await {
|
||||
// Return a soft-logout for previous tokens. This is necessary
|
||||
// to make token refreshing idempotent.
|
||||
|
||||
Err(Error::Request(
|
||||
ErrorKind::UnknownToken(assign!(UnknownTokenErrorData::new(), { soft_logout: true })),
|
||||
"This token has expired".into(),
|
||||
StatusCode::UNAUTHORIZED,
|
||||
))
|
||||
} else {
|
||||
Err(Error::Request(
|
||||
ErrorKind::UnknownToken(UnknownTokenErrorData::new()),
|
||||
|
||||
+295
-68
@@ -1,89 +1,316 @@
|
||||
use std::{collections::BTreeMap, mem::take, time::Duration};
|
||||
use std::{
|
||||
collections::{BTreeMap, HashSet},
|
||||
sync::Arc,
|
||||
time::Instant,
|
||||
};
|
||||
|
||||
use axum::{Json, extract::State, response::IntoResponse};
|
||||
use conduwuit::{Result, utils::timepoint_from_now};
|
||||
use futures::StreamExt;
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Result,
|
||||
config::experiments::ToggledExperiment,
|
||||
debug_info,
|
||||
utils::{ReadyExt, stream::automatic_width},
|
||||
};
|
||||
use ruma::{
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
api::{
|
||||
OutgoingResponseExt,
|
||||
federation::discovery::{OldVerifyKey, ServerSigningKeys, get_server_keys},
|
||||
MilliSecondsSinceUnixEpoch, OwnedServerName, OwnedServerSigningKeyId,
|
||||
api::federation::discovery::{
|
||||
ServerSigningKeys, get_remote_server_keys, get_remote_server_keys_batch,
|
||||
get_remote_server_keys_batch::v2::QueryCriteria, get_server_keys,
|
||||
},
|
||||
assign,
|
||||
serde::Raw,
|
||||
};
|
||||
use service::{server_keys, server_keys::in_one_week};
|
||||
use service::server_keys::{self, in_one_week};
|
||||
|
||||
use crate::router::Ruma;
|
||||
|
||||
/// # `GET /_matrix/key/v2/server`
|
||||
///
|
||||
/// Gets the public signing keys of this server.
|
||||
pub(crate) async fn get_server_keys_route(
|
||||
State(services): State<crate::State>,
|
||||
) -> Result<impl IntoResponse> {
|
||||
let server_name = services.globals.server_name();
|
||||
let verify_keys = BTreeMap::from([services.server_keys.active_verify_key()]);
|
||||
_body: Ruma<get_server_keys::v2::Request>,
|
||||
) -> Result<get_server_keys::v2::Response> {
|
||||
services
|
||||
.server_keys
|
||||
.build_server_keys_response()
|
||||
.await
|
||||
.map(get_server_keys::v2::Response::new)
|
||||
}
|
||||
|
||||
let old_verify_keys = if let Some(k) = &services.config.old_verify_keys {
|
||||
k.to_owned()
|
||||
} else {
|
||||
// We need to figure out any old signing keys we've acquired from
|
||||
// notaries.
|
||||
let mut keys = services.server_keys.signing_keys_for(server_name);
|
||||
let mut old_keys = BTreeMap::new();
|
||||
while let Some(resp) = keys.next().await {
|
||||
// We need to verify that this response is still trusted based on
|
||||
// the current configuration. It's possible we got this response
|
||||
// from a notary who we no longer trust.
|
||||
if resp.parsed.valid_until_ts > in_one_week() {
|
||||
continue;
|
||||
}
|
||||
let trusted = services.config.trusted_servers.iter().any(|notary| {
|
||||
server_keys::Service::verify_server_keys_response(
|
||||
&resp,
|
||||
Some((notary.server_name(), notary.verify_keys())),
|
||||
)
|
||||
.is_ok()
|
||||
});
|
||||
if !trusted {
|
||||
continue;
|
||||
}
|
||||
for (old_key_id, old_key) in resp.parsed.old_verify_keys {
|
||||
if old_key.expired_ts > resp.parsed.valid_until_ts {
|
||||
// This key expired in the future which is probably illegal
|
||||
continue;
|
||||
}
|
||||
old_keys
|
||||
.entry(old_key_id)
|
||||
.and_modify(|current_old_key: &mut OldVerifyKey| {
|
||||
// Use the lowest expiry timestamp
|
||||
if current_old_key.expired_ts > old_key.expired_ts {
|
||||
*current_old_key = old_key.clone();
|
||||
}
|
||||
})
|
||||
.or_insert(old_key);
|
||||
}
|
||||
const MAX_KEYS_PER_QUERY: usize = 16384;
|
||||
const MAX_SERVERS_PER_QUERY: usize = 4096;
|
||||
|
||||
/// # `POST /_matrix/key/v2/query`
|
||||
///
|
||||
/// Fetches remote server signing keys in bulk, seeding from the local server's
|
||||
/// database.
|
||||
///
|
||||
/// This route applies a semaphore to slow down requests that query more signing
|
||||
/// keys than is allowed by [MSC4556].
|
||||
///
|
||||
/// [MSC4556]: https://github.com/matrix-org/matrix-spec-proposals/pull/4556
|
||||
pub(crate) async fn get_remote_server_keys_batch_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<get_remote_server_keys_batch::v2::Request>,
|
||||
) -> Result<get_remote_server_keys_batch::v2::Response> {
|
||||
query_inner(&services, body.body.server_keys, true)
|
||||
.await
|
||||
.map(get_remote_server_keys_batch::v2::Response::new)
|
||||
}
|
||||
|
||||
/// # `POST /_matrix/key/unstable/org.continuwuity.msc4556/query`
|
||||
/// ## `POST /_matrix/key/v3/query`
|
||||
///
|
||||
/// Fetches remote server signing keys in bulk, seeding from the local server's
|
||||
/// database.
|
||||
///
|
||||
/// MSC4556: https://github.com/matrix-org/matrix-spec-proposals/pull/4556
|
||||
pub(crate) async fn get_remote_server_keys_batch_v3_unstable_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<ruminuwuity::federation::notary::unstable::Request>,
|
||||
) -> Result<ruminuwuity::federation::notary::unstable::Response> {
|
||||
query_inner(&services, body.body.server_keys, false)
|
||||
.await
|
||||
.map(ruminuwuity::federation::notary::unstable::Response::new)
|
||||
}
|
||||
|
||||
/// Handles querying the server keys for `/_matrix/key/*/query`.
|
||||
///
|
||||
/// `v2` should be `true` if the request path is `/_matrix/key/v2/query` - this
|
||||
/// will potentially apply a rate-limit to the request.
|
||||
async fn query_inner(
|
||||
services: &crate::State,
|
||||
body: BTreeMap<OwnedServerName, BTreeMap<OwnedServerSigningKeyId, QueryCriteria>>,
|
||||
v2: bool,
|
||||
) -> Result<Vec<Raw<ServerSigningKeys>>> {
|
||||
let start = (Instant::now(), MilliSecondsSinceUnixEpoch::now());
|
||||
// If the remote server isn't asking for any keys, we can return an empty
|
||||
// array immediately.
|
||||
if body.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
||||
// Count how many keys are being requested.
|
||||
// Each server incurs a cost of at least one, and then the count of each key
|
||||
// being queried per-server.
|
||||
let total_queried_servers = body.len();
|
||||
let total_queried_keys = body
|
||||
.values()
|
||||
.fold(0_usize, |acc, q| acc.saturating_add(q.len().max(1)));
|
||||
|
||||
if !v2 && services.config.experiments.msc4556.is_enabled() {
|
||||
// If we're on the v3 endpoint, we can apply these limits explicitly.
|
||||
if total_queried_servers > MAX_SERVERS_PER_QUERY {
|
||||
return Err!(Request(TooLarge(
|
||||
"Too many server keys requested ({total_queried_servers} > \
|
||||
{MAX_SERVERS_PER_QUERY})",
|
||||
)));
|
||||
}
|
||||
old_keys
|
||||
if total_queried_keys > MAX_KEYS_PER_QUERY {
|
||||
return Err!(Request(TooLarge(
|
||||
"Too many keys requested ({total_queried_keys} > {MAX_KEYS_PER_QUERY})"
|
||||
)));
|
||||
}
|
||||
}
|
||||
let penalise =
|
||||
total_queried_servers > MAX_SERVERS_PER_QUERY || total_queried_keys > MAX_KEYS_PER_QUERY;
|
||||
|
||||
debug_info!("Fetching {total_queried_keys} keys across {} servers", body.len());
|
||||
let mut futs: tokio::task::JoinSet<_> = tokio::task::JoinSet::new();
|
||||
|
||||
// If we're on the v2 endpoint, we aren't allowed to reject the request.
|
||||
// To avoid overloading the server, we'll apply a semaphore to limit how
|
||||
// many futures can be active at a time.
|
||||
let width = automatic_width();
|
||||
|
||||
let semaphore: Option<Arc<tokio::sync::Semaphore>> = if v2 && penalise {
|
||||
Some(Arc::new(tokio::sync::Semaphore::new(width)))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let server_key = assign!(ServerSigningKeys::new(server_name.to_owned(), valid_until_ts()), {
|
||||
verify_keys,
|
||||
old_verify_keys,
|
||||
});
|
||||
for (server_name, queries) in body {
|
||||
let server_keys = services.server_keys.clone();
|
||||
let semaphore = semaphore.clone();
|
||||
|
||||
let server_key = Raw::new(&server_key)?;
|
||||
let mut response = get_server_keys::v2::Response::new(server_key)
|
||||
.try_into_http_response::<Vec<u8>>()
|
||||
.map(|mut response| take(response.body_mut()))
|
||||
.and_then(|body| serde_json::from_slice(&body).map_err(Into::into))?;
|
||||
futs.spawn_on(
|
||||
async move {
|
||||
let _permit = if let Some(sem) = semaphore {
|
||||
let cost = queries
|
||||
.len()
|
||||
.saturating_add(1)
|
||||
.min(automatic_width())
|
||||
.try_into()
|
||||
.unwrap_or(u32::MAX);
|
||||
|
||||
services.server_keys.sign_json(&mut response)?;
|
||||
sem.acquire_many_owned(cost).await.ok()
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Ok(Json(response))
|
||||
acquire_keys_as_notary(server_keys, server_name, queries, start.1).await
|
||||
},
|
||||
services.server.runtime(),
|
||||
);
|
||||
}
|
||||
|
||||
let mut response = Vec::with_capacity(total_queried_keys);
|
||||
|
||||
while let Some(Ok(v)) = futs.join_next().await {
|
||||
response.extend(v);
|
||||
}
|
||||
|
||||
debug_info!(
|
||||
elapsed=?start.0.elapsed(),
|
||||
%total_queried_servers,
|
||||
%total_queried_keys,
|
||||
"Fetched {} key responses",
|
||||
response.len()
|
||||
);
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
fn valid_until_ts() -> MilliSecondsSinceUnixEpoch {
|
||||
let dur = Duration::from_hours(12);
|
||||
let timepoint = timepoint_from_now(dur).expect("SystemTime should not overflow");
|
||||
MilliSecondsSinceUnixEpoch::from_system_time(timepoint).expect("UInt should not overflow")
|
||||
/// `GET /_matrix/key/v2/query/{serverName}`
|
||||
///
|
||||
/// Fetches the latest keys for a specific server name.
|
||||
pub(crate) async fn get_remote_server_keys_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<get_remote_server_keys::v2::Request>,
|
||||
) -> Result<get_remote_server_keys::v2::Response> {
|
||||
let server_keys = acquire_keys_as_notary(
|
||||
services.server_keys.clone(),
|
||||
body.server_name.clone(),
|
||||
BTreeMap::new(),
|
||||
body.minimum_valid_until_ts,
|
||||
)
|
||||
.await;
|
||||
|
||||
Ok(get_remote_server_keys::v2::Response::new(server_keys))
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(server_keys, queries, start))]
|
||||
async fn acquire_keys_as_notary(
|
||||
server_keys: Arc<server_keys::Service>,
|
||||
remote: OwnedServerName,
|
||||
queries: BTreeMap<OwnedServerSigningKeyId, QueryCriteria>,
|
||||
start: MilliSecondsSinceUnixEpoch,
|
||||
) -> Vec<Raw<ServerSigningKeys>> {
|
||||
let mut candidate_remote_keys = Vec::with_capacity(queries.len().max(1));
|
||||
|
||||
// If we haven't contacted the origin recently, we need to do that now
|
||||
// to update our caches, and we might as well use its response as a
|
||||
// candidate.
|
||||
if server_keys.origin_not_contacted_recently(&remote) {
|
||||
let min_valid_ts = queries
|
||||
.values()
|
||||
.map(|criterion| criterion.minimum_valid_until_ts.unwrap_or(start))
|
||||
.min()
|
||||
.unwrap_or(start);
|
||||
|
||||
if let Ok(remote_keys) = server_keys
|
||||
.origin_request(remote.clone(), min_valid_ts)
|
||||
.await
|
||||
{
|
||||
debug_info!("Considering keys from origin response");
|
||||
candidate_remote_keys.push(remote_keys);
|
||||
}
|
||||
}
|
||||
|
||||
if queries.is_empty() {
|
||||
// The querying server wants all of the origin's keys. If we decided to
|
||||
// contact it earlier, we can safely assume its response already
|
||||
// includes all of its keys. Otherwise, we'll add all of our cached
|
||||
// responses as candidates.
|
||||
|
||||
if candidate_remote_keys.is_empty() {
|
||||
debug_info!("Querying server wants all keys, considering all cached key responses");
|
||||
server_keys
|
||||
.signing_keys_for(&remote)
|
||||
.ready_for_each(|remote_keys| candidate_remote_keys.push(remote_keys))
|
||||
.await;
|
||||
}
|
||||
} else {
|
||||
// The querying server is asking for specific key IDs.
|
||||
|
||||
for key_id in queries.keys() {
|
||||
if let Some(remote_keys) = server_keys.get_signing_key(&remote, key_id).await {
|
||||
debug_info!(?key_id, "Considering cached response containing key");
|
||||
|
||||
candidate_remote_keys.push(remote_keys);
|
||||
} else {
|
||||
debug_info!(?key_id, "No cached response contains key");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now we need to filter and sign the remote key responses.
|
||||
|
||||
// The signing key responses containing the keys the querying server wants.
|
||||
let mut signed_remote_key_responses = Vec::with_capacity(queries.len().max(1));
|
||||
|
||||
// The key IDs we've already included in a response.
|
||||
let mut signed_remote_key_ids = HashSet::with_capacity(queries.len().max(1));
|
||||
|
||||
for remote_keys in candidate_remote_keys {
|
||||
// Skip this key response if it expires too far in the future.
|
||||
if remote_keys.parsed.valid_until_ts > in_one_week() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Determine which requested keys (or all keys when no specific keys
|
||||
// were requested) are newly satisfied by this response.
|
||||
let newly_satisfied: Vec<OwnedServerSigningKeyId> = if queries.is_empty() {
|
||||
if remote_keys.parsed.valid_until_ts < start {
|
||||
continue;
|
||||
}
|
||||
|
||||
remote_keys
|
||||
.all_key_ids()
|
||||
.filter(|key_id| !signed_remote_key_ids.contains(*key_id))
|
||||
.map(ToOwned::to_owned)
|
||||
.collect()
|
||||
} else {
|
||||
queries
|
||||
.iter()
|
||||
.filter_map(|(key_id, criterion)| {
|
||||
if signed_remote_key_ids.contains(key_id) {
|
||||
return None;
|
||||
}
|
||||
|
||||
let minimum_valid_until_ts =
|
||||
criterion.minimum_valid_until_ts.unwrap_or(start);
|
||||
|
||||
if remote_keys.parsed.valid_until_ts < minimum_valid_until_ts {
|
||||
return None;
|
||||
}
|
||||
|
||||
let satisfied = remote_keys.parsed.verify_keys.contains_key(key_id)
|
||||
|| remote_keys.parsed.old_verify_keys.get(key_id).is_some_and(
|
||||
|old_key| {
|
||||
criterion
|
||||
.minimum_valid_until_ts
|
||||
.is_none_or(|min_ts| old_key.expired_ts >= min_ts)
|
||||
},
|
||||
);
|
||||
|
||||
satisfied.then(|| key_id.to_owned())
|
||||
})
|
||||
.collect()
|
||||
};
|
||||
|
||||
if newly_satisfied.is_empty() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// This response is acceptable, let's sign and send it.
|
||||
|
||||
let signed_remote_keys = server_keys
|
||||
.self_sign_signing_keys(&remote, &remote_keys.raw)
|
||||
.expect("should be able to sign remote keys");
|
||||
|
||||
signed_remote_key_responses.push(signed_remote_keys);
|
||||
signed_remote_key_ids.extend(newly_satisfied);
|
||||
}
|
||||
|
||||
signed_remote_key_responses
|
||||
}
|
||||
+4
-4
@@ -38,12 +38,12 @@ mimalloc = [
|
||||
]
|
||||
jemalloc_conf = []
|
||||
jemalloc_prof = [
|
||||
"tikv-jemalloc-sys/profiling",
|
||||
"tikv-jemalloc-sys?/profiling",
|
||||
]
|
||||
jemalloc_stats = [
|
||||
"tikv-jemalloc-sys/stats",
|
||||
"tikv-jemalloc-ctl/stats",
|
||||
"tikv-jemallocator/stats",
|
||||
"tikv-jemalloc-sys?/stats",
|
||||
"tikv-jemalloc-ctl?/stats",
|
||||
"tikv-jemallocator?/stats",
|
||||
]
|
||||
perf_measurements = []
|
||||
release_max_log_level = [
|
||||
|
||||
@@ -118,6 +118,22 @@ pub struct Experiments {
|
||||
/// default: false
|
||||
#[serde(default)]
|
||||
pub msc4494: SimpleExperiment,
|
||||
/// MSC4556: Notary request limits
|
||||
///
|
||||
/// Creates a new key notary server route that has stricter limits on how
|
||||
/// many signing keys can be requested in one query, to avoid a resource
|
||||
/// exhaustion exploit vector in the existing key notary endpoint.
|
||||
///
|
||||
/// Continuwuity mitigates the exploit vector in the old notary endpoint
|
||||
/// anyway, so you do not need to enable this to be protected.
|
||||
///
|
||||
/// Requires that remote servers support this MSC before it does anything.
|
||||
///
|
||||
/// https://github.com/matrix-org/matrix-spec-proposals/pull/4556
|
||||
///
|
||||
/// default: false
|
||||
#[serde(default)]
|
||||
pub msc4556: SimpleExperiment,
|
||||
/// MSC4560: Stripped state requests over federation
|
||||
///
|
||||
/// Implements a more efficient way for servers to acquire and serve
|
||||
|
||||
+7
-11
@@ -1154,10 +1154,7 @@ pub struct Config {
|
||||
/// (trusted key notary servers), as well as serve as trusted servers for
|
||||
/// other operations like backfill and event fetching.
|
||||
///
|
||||
/// Currently, continuwuity doesn't support inbound key requests, so
|
||||
/// this list should only contain other Synapse servers.
|
||||
///
|
||||
/// example: ["matrix.org", "starstruck.systems"]
|
||||
/// example: ["continuwuity.org", "matrix.org"]
|
||||
///
|
||||
/// It is possible to restrict which signing keys trusted servers are
|
||||
/// allowed to sign responses with. Without configuring this, all responses
|
||||
@@ -1194,7 +1191,7 @@ pub struct Config {
|
||||
/// empty list (`[]`) to operate without trusted server assistance, but this
|
||||
/// is discouraged for performance and reliability reasons.
|
||||
///
|
||||
/// default: ["matrix.org"]
|
||||
/// default: ["continuwuity.org", "continuwuity.rocks", "matrix.org"]
|
||||
#[serde(default = "default_trusted_servers")]
|
||||
pub trusted_servers: Vec<TrustedServer>,
|
||||
|
||||
@@ -3264,12 +3261,11 @@ fn default_otlp_filter() -> String {
|
||||
fn default_tracing_flame_output_path() -> String { "./tracing.folded".to_owned() }
|
||||
|
||||
fn default_trusted_servers() -> Vec<TrustedServer> {
|
||||
// TODO(nex): Once we can be a notary, add maintainer(?) homeservers here.
|
||||
// Rationale: Users are already running our code, arguably that's a higher
|
||||
// level of trust than is assigned to notaries in the first place.
|
||||
// We should still remind everyone that notaries are evil and out to get you
|
||||
// and to replace this list with servers they actually trust.
|
||||
let trusted_servers = vec![ruma::owned_server_name!("matrix.org")];
|
||||
let trusted_servers = vec![
|
||||
ruma::owned_server_name!("continuwuity.org"),
|
||||
ruma::owned_server_name!("continuwuity.rocks"),
|
||||
ruma::owned_server_name!("matrix.org"),
|
||||
];
|
||||
trusted_servers
|
||||
.into_iter()
|
||||
.map(TrustedServer::Name)
|
||||
|
||||
@@ -407,6 +407,10 @@ pub(super) static MAPS: &[Descriptor] = &[
|
||||
name: "userdeviceid_token",
|
||||
..descriptor::RANDOM_SMALL
|
||||
},
|
||||
Descriptor {
|
||||
name: "userdeviceid_previoustoken",
|
||||
..descriptor::RANDOM_SMALL
|
||||
},
|
||||
Descriptor {
|
||||
name: "userdevicesessionid_uiaainfo",
|
||||
..descriptor::RANDOM_SMALL
|
||||
|
||||
+1
-1
@@ -48,6 +48,7 @@ assets = [
|
||||
[features]
|
||||
default = [
|
||||
"standard",
|
||||
"jemalloc",
|
||||
"ring",
|
||||
"bindgen-runtime", # replace with bindgen-static on alpine
|
||||
]
|
||||
@@ -57,7 +58,6 @@ standard = [
|
||||
"element_hacks",
|
||||
"gzip_compression",
|
||||
"io_uring",
|
||||
"jemalloc",
|
||||
"jemalloc_conf",
|
||||
"journald",
|
||||
"media_thumbnail",
|
||||
|
||||
@@ -32,6 +32,11 @@ pub fn run() -> Result<()> {
|
||||
pub fn run_with_args(args: &Args) -> Result<()> {
|
||||
// Spawn deadlock detection thread
|
||||
deadlock::spawn();
|
||||
#[cfg(not(any(feature = "jemalloc", feature = "mimalloc")))]
|
||||
conduwuit_core::warn!(
|
||||
"Your build configuration does not have a non-system allocator enabled. This may result \
|
||||
in decreased performance."
|
||||
);
|
||||
|
||||
// Because we're not using rustls default-tls, we have to initialise a TLS
|
||||
// provider
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pub mod notary;
|
||||
@@ -0,0 +1,56 @@
|
||||
//! `POST /_matrix/key/*/query`
|
||||
//!
|
||||
//! Endpoint to query signing keys through other (notary) servers.
|
||||
|
||||
pub mod unstable {
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma::{
|
||||
OwnedServerName, OwnedServerSigningKeyId,
|
||||
api::{
|
||||
federation::{
|
||||
authentication::ServerSignatures,
|
||||
discovery::{ServerSigningKeys, get_remote_server_keys_batch::v2::QueryCriteria},
|
||||
},
|
||||
request, response,
|
||||
},
|
||||
metadata,
|
||||
serde::Raw,
|
||||
};
|
||||
|
||||
metadata! {
|
||||
method: POST,
|
||||
rate_limited: true,
|
||||
authentication: ServerSignatures,
|
||||
path: "/_matrix/key/unstable/org.continuwuity.msc4556/query",
|
||||
}
|
||||
|
||||
#[request]
|
||||
pub struct Request {
|
||||
pub server_keys:
|
||||
BTreeMap<OwnedServerName, BTreeMap<OwnedServerSigningKeyId, QueryCriteria>>,
|
||||
}
|
||||
|
||||
#[response]
|
||||
pub struct Response {
|
||||
pub server_keys: Vec<Raw<ServerSigningKeys>>,
|
||||
}
|
||||
|
||||
impl Request {
|
||||
#[must_use]
|
||||
pub fn new(
|
||||
server_keys: BTreeMap<
|
||||
OwnedServerName,
|
||||
BTreeMap<OwnedServerSigningKeyId, QueryCriteria>,
|
||||
>,
|
||||
) -> Self {
|
||||
Self { server_keys }
|
||||
}
|
||||
}
|
||||
|
||||
impl Response {
|
||||
/// Creates a new `Response` with the given keys.
|
||||
#[must_use]
|
||||
pub fn new(server_keys: Vec<Raw<ServerSigningKeys>>) -> Self { Self { server_keys } }
|
||||
}
|
||||
}
|
||||
@@ -6,3 +6,5 @@ pub mod invite_permission_config;
|
||||
pub mod meowlnir_antispam;
|
||||
pub mod policy;
|
||||
pub mod pushers;
|
||||
|
||||
pub mod federation;
|
||||
+139
-18
@@ -1,5 +1,6 @@
|
||||
use std::{
|
||||
collections::{BTreeSet, HashMap},
|
||||
fmt::Write,
|
||||
sync::Arc,
|
||||
time::{Duration, SystemTime},
|
||||
};
|
||||
@@ -8,8 +9,9 @@ use base64::Engine;
|
||||
use conduwuit::{
|
||||
Result, SyncMutex,
|
||||
config::experiments::ToggledExperiment,
|
||||
info,
|
||||
utils::{self, hash::sha256},
|
||||
error, info,
|
||||
utils::{self, MutexMap, hash::sha256},
|
||||
warn,
|
||||
};
|
||||
use database::{Deserialized, Json, Map};
|
||||
use itertools::Itertools;
|
||||
@@ -29,15 +31,25 @@ use crate::{
|
||||
ResponseMode, TokenRequest, TokenRequestType, TokenResponse, TokenType,
|
||||
},
|
||||
},
|
||||
users::{self, DeviceToken},
|
||||
users::{self, DeviceToken, PreviousTokenAction},
|
||||
};
|
||||
|
||||
pub mod client_metadata;
|
||||
pub mod grant;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
struct SessionLockKey(OwnedUserId, OwnedDeviceId);
|
||||
|
||||
impl From<&(&UserId, &DeviceId)> for SessionLockKey {
|
||||
fn from((user_id, device_id): &(&UserId, &DeviceId)) -> Self {
|
||||
Self((*user_id).to_owned(), (*device_id).to_owned())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Service {
|
||||
services: Services,
|
||||
db: Data,
|
||||
session_mutex: MutexMap<SessionLockKey, ()>,
|
||||
tickets: SyncMutex<HashMap<String, HashMap<OAuthTicket, SystemTime>>>,
|
||||
pending_auth_code_grants: SyncMutex<LruCache<String, PendingAuthCodeGrant>>,
|
||||
pending_device_code_grants: SyncMutex<LruCache<String, PendingDeviceCodeGrant>>,
|
||||
@@ -55,7 +67,7 @@ struct Services {
|
||||
config: Dep<config::Service>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
pub struct SessionInfo {
|
||||
pub client_id: String,
|
||||
#[serde(deserialize_with = "client_metadata::btreeset_skip_err")]
|
||||
@@ -64,6 +76,8 @@ pub struct SessionInfo {
|
||||
temporary_scopes: BTreeSet<OAuthClientScope>,
|
||||
#[serde(default)]
|
||||
current_refresh_token: String,
|
||||
#[serde(default)]
|
||||
previous_refresh_token: Option<String>,
|
||||
}
|
||||
|
||||
impl SessionInfo {
|
||||
@@ -71,6 +85,18 @@ impl SessionInfo {
|
||||
pub fn scopes(&self) -> BTreeSet<OAuthClientScope> {
|
||||
self.scopes.union(&self.temporary_scopes).cloned().collect()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn has_previous_refresh_token(&self) -> bool { self.previous_refresh_token.is_some() }
|
||||
|
||||
#[must_use]
|
||||
pub fn scope_string(&self, device_id: &DeviceId) -> String {
|
||||
let mut scopes = self.scopes().iter().join(" ");
|
||||
|
||||
let _ = write!(scopes, " urn:matrix:client:device:{device_id}");
|
||||
|
||||
scopes
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
@@ -171,6 +197,7 @@ impl crate::Service for Service {
|
||||
userdeviceid_oauthsessioninfo: args.db["userdeviceid_oauthsessioninfo"].clone(),
|
||||
refreshtoken_refreshtokeninfo: args.db["refreshtoken_refreshtokeninfo"].clone(),
|
||||
},
|
||||
session_mutex: MutexMap::new(),
|
||||
tickets: SyncMutex::default(),
|
||||
pending_auth_code_grants: SyncMutex::new(LruCache::new(Self::MAX_PENDING_GRANTS)),
|
||||
pending_device_code_grants: SyncMutex::new(LruCache::new(Self::MAX_PENDING_GRANTS)),
|
||||
@@ -246,6 +273,26 @@ impl Service {
|
||||
.ok()
|
||||
}
|
||||
|
||||
/// Clear a session's previous refresh token, if it has one.
|
||||
pub async fn clear_previous_refresh_token(&self, user_id: &UserId, device_id: &DeviceId) {
|
||||
let _lock = self.session_mutex.lock(&(user_id, device_id)).await;
|
||||
|
||||
let Some(mut session_info) = self.get_session_info_for_device(user_id, device_id).await
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
||||
if let Some(previous_refresh_token) = session_info.previous_refresh_token.take() {
|
||||
self.db
|
||||
.refreshtoken_refreshtokeninfo
|
||||
.remove(&previous_refresh_token);
|
||||
|
||||
self.db
|
||||
.userdeviceid_oauthsessioninfo
|
||||
.put((user_id, device_id), Json(session_info));
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn request_authorization_code(
|
||||
&self,
|
||||
authorizing_user: OwnedUserId,
|
||||
@@ -573,6 +620,11 @@ impl Service {
|
||||
.device_id
|
||||
.ok_or_else(|| OAuthError::invalid_grant("No device ID scope supplied"))?;
|
||||
|
||||
let _lock = self
|
||||
.session_mutex
|
||||
.lock(&(&*authorizing_user, &*device_id))
|
||||
.await;
|
||||
|
||||
let session_info = if self
|
||||
.services
|
||||
.users
|
||||
@@ -606,7 +658,12 @@ impl Service {
|
||||
|
||||
self.services
|
||||
.users
|
||||
.set_token(&authorizing_user, &device_id, access_token.clone())
|
||||
.set_token(
|
||||
&authorizing_user,
|
||||
&device_id,
|
||||
access_token.clone(),
|
||||
PreviousTokenAction::Replace,
|
||||
)
|
||||
.await
|
||||
.expect("should be able to set access token");
|
||||
|
||||
@@ -645,6 +702,7 @@ impl Service {
|
||||
SessionInfo {
|
||||
client_id: client_id.clone(),
|
||||
current_refresh_token: Self::generate_token(),
|
||||
previous_refresh_token: None,
|
||||
scopes: requested_scopes.scopes,
|
||||
temporary_scopes: BTreeSet::new(),
|
||||
}
|
||||
@@ -692,25 +750,85 @@ impl Service {
|
||||
|
||||
assert_eq!(&client_id, &refresh_token_info.client_id, "refresh token client id mismatch");
|
||||
|
||||
let mut session_info = self
|
||||
let _lock = self
|
||||
.session_mutex
|
||||
.lock(&(&*refresh_token_info.user_id, &*refresh_token_info.device_id))
|
||||
.await;
|
||||
|
||||
let Some(mut session_info) = self
|
||||
.get_session_info_for_device(
|
||||
&refresh_token_info.user_id,
|
||||
&refresh_token_info.device_id,
|
||||
)
|
||||
.await
|
||||
.expect("session info should exist");
|
||||
else {
|
||||
warn!(
|
||||
user_id = ?refresh_token_info.user_id,
|
||||
device_id = ?refresh_token_info.device_id,
|
||||
"Refresh token exists for a missing OAuth session"
|
||||
);
|
||||
self.db.refreshtoken_refreshtokeninfo.remove(&refresh_token);
|
||||
return Err(OAuthError::invalid_grant("Invalid refresh token"));
|
||||
};
|
||||
|
||||
assert_eq!(&client_id, &session_info.client_id, "session info client id mismatch");
|
||||
|
||||
// TODO: this doesn't include the device ID "scope", do any clients rely
|
||||
// on that?
|
||||
let scope = session_info.scopes.iter().join(" ");
|
||||
let new_refresh_token = Self::generate_token();
|
||||
|
||||
let previous_token_action = if refresh_token == session_info.current_refresh_token {
|
||||
// The client is refreshing with their current refresh token.
|
||||
// We need to generate a new refresh token and save this token as
|
||||
// the previous one.
|
||||
|
||||
session_info
|
||||
.current_refresh_token
|
||||
.clone_from(&new_refresh_token);
|
||||
|
||||
// Remove the old previous token if it's set. This can only happen
|
||||
// if the client decides to refresh twice in a row without using its
|
||||
// new access token, since we'll also do this when the new access
|
||||
// token is used for the first time.
|
||||
if let Some(previous_refresh_token) = session_info.previous_refresh_token {
|
||||
self.db
|
||||
.refreshtoken_refreshtokeninfo
|
||||
.remove(&previous_refresh_token);
|
||||
}
|
||||
|
||||
session_info.previous_refresh_token = Some(refresh_token);
|
||||
PreviousTokenAction::Replace
|
||||
} else if Some(&refresh_token) == session_info.previous_refresh_token.as_ref() {
|
||||
// The client is refreshing with their previous refresh token,
|
||||
// probably because they didn't get the new one we made for them. We
|
||||
// need to make a second new one, but we don't touch the existing
|
||||
// previous one in case they don't get the second new one either.
|
||||
|
||||
// Wipe the current token, we're going to make a new one.
|
||||
self.db
|
||||
.refreshtoken_refreshtokeninfo
|
||||
.remove(&session_info.current_refresh_token);
|
||||
|
||||
session_info
|
||||
.current_refresh_token
|
||||
.clone_from(&new_refresh_token);
|
||||
PreviousTokenAction::Preserve
|
||||
} else {
|
||||
// The client is trying to use a refresh token that isn't their
|
||||
// current or previous one, but still has information in the
|
||||
// database. Clean up the stale entry and reject the grant.
|
||||
error!(
|
||||
user_id = ?refresh_token_info.user_id,
|
||||
device_id = ?refresh_token_info.device_id,
|
||||
"Refresh token is neither current nor previous for its session"
|
||||
);
|
||||
self.db.refreshtoken_refreshtokeninfo.remove(&refresh_token);
|
||||
return Err(OAuthError::invalid_grant("Invalid refresh token"));
|
||||
};
|
||||
|
||||
session_info.temporary_scopes.clear();
|
||||
|
||||
let scope = session_info.scope_string(&refresh_token_info.device_id);
|
||||
|
||||
let new_access_token = DeviceToken::new_random().with_max_age(Self::ACCESS_TOKEN_MAX_AGE);
|
||||
let new_refresh_token = Self::generate_token();
|
||||
session_info
|
||||
.current_refresh_token
|
||||
.clone_from(&new_refresh_token);
|
||||
|
||||
self.services
|
||||
.users
|
||||
@@ -718,19 +836,16 @@ impl Service {
|
||||
&refresh_token_info.user_id,
|
||||
&refresh_token_info.device_id,
|
||||
new_access_token.clone(),
|
||||
previous_token_action,
|
||||
)
|
||||
.await
|
||||
.expect("should be able to set token");
|
||||
|
||||
session_info.temporary_scopes.clear();
|
||||
|
||||
self.db.userdeviceid_oauthsessioninfo.put(
|
||||
(&refresh_token_info.user_id, &refresh_token_info.device_id),
|
||||
Json(session_info),
|
||||
);
|
||||
|
||||
self.db.refreshtoken_refreshtokeninfo.remove(&refresh_token);
|
||||
drop(refresh_token);
|
||||
self.db
|
||||
.refreshtoken_refreshtokeninfo
|
||||
.raw_put(&new_refresh_token, Json(refresh_token_info));
|
||||
@@ -745,12 +860,18 @@ impl Service {
|
||||
}
|
||||
|
||||
pub async fn remove_session(&self, user_id: &UserId, device_id: &DeviceId) {
|
||||
let _lock = self.session_mutex.lock(&(user_id, device_id)).await;
|
||||
let session_info = self.get_session_info_for_device(user_id, device_id).await;
|
||||
|
||||
if let Some(session_info) = session_info {
|
||||
self.db
|
||||
.refreshtoken_refreshtokeninfo
|
||||
.remove(&session_info.current_refresh_token);
|
||||
if let Some(previous_refresh_token) = session_info.previous_refresh_token {
|
||||
self.db
|
||||
.refreshtoken_refreshtokeninfo
|
||||
.remove(&previous_refresh_token);
|
||||
}
|
||||
self.db
|
||||
.userdeviceid_oauthsessioninfo
|
||||
.del((user_id, device_id));
|
||||
|
||||
@@ -158,7 +158,7 @@ impl super::Service {
|
||||
|
||||
if let Some(server_keys) = self.get_signing_key(origin, key_id).await
|
||||
&& let Some(key) =
|
||||
verify_key_from_response(key_id, &server_keys, min_valid_ts)
|
||||
verify_key_from_response(key_id, &server_keys.parsed, min_valid_ts)
|
||||
{
|
||||
trace!(%origin, %key_id, ?min_valid_ts, "Verify key exists locally");
|
||||
Self::track_one_result(
|
||||
@@ -242,7 +242,6 @@ impl super::Service {
|
||||
}
|
||||
};
|
||||
trace!(?origin_response.raw, "Got signing key response from origin");
|
||||
self.add_signing_keys(&origin_response);
|
||||
Self::track_result(&mut result, &mut still_missing, &origin_response.parsed);
|
||||
if still_missing.is_empty() {
|
||||
break;
|
||||
@@ -301,7 +300,6 @@ impl super::Service {
|
||||
continue;
|
||||
};
|
||||
trace!(response=?res.raw, "Got signing key response from origin");
|
||||
self.add_signing_keys(&res);
|
||||
Self::track_result(&mut result, &mut still_missing, &res.parsed);
|
||||
if still_missing.is_empty() {
|
||||
break;
|
||||
@@ -387,7 +385,7 @@ impl super::Service {
|
||||
if let Some(vk) = self
|
||||
.get_signing_key(origin, key_id)
|
||||
.await
|
||||
.and_then(|ssk| verify_key_from_response(key_id, &ssk, min_valid_ts))
|
||||
.and_then(|ssk| verify_key_from_response(key_id, &ssk.parsed, min_valid_ts))
|
||||
{
|
||||
trace!("Found verify key locally");
|
||||
return Some(vk);
|
||||
@@ -401,7 +399,6 @@ impl super::Service {
|
||||
.ok()?;
|
||||
|
||||
verify_key_from_response(key_id, &response.parsed, min_valid_ts)
|
||||
.inspect(|_| self.add_signing_keys(&response))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,32 +5,43 @@ mod sign;
|
||||
mod util;
|
||||
mod verify;
|
||||
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
use std::{
|
||||
collections::{BTreeMap, HashMap},
|
||||
sync::Arc,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
use assign::assign;
|
||||
use async_trait::async_trait;
|
||||
use conduwuit::{
|
||||
Result, Server,
|
||||
utils::{IterStream, ReadyExt, stream::TryIgnore},
|
||||
Result, Server, SyncRwLock, debug_info,
|
||||
utils::{IterStream, ReadyExt, stream::TryIgnore, timepoint_from_now, to_canonical_object},
|
||||
};
|
||||
use database::{Deserialized, Ignore, Interfix, Json, Map};
|
||||
use futures::{Stream, StreamExt};
|
||||
pub use request::in_one_week;
|
||||
use ruma::{
|
||||
CanonicalJsonObject, MilliSecondsSinceUnixEpoch, OwnedServerSigningKeyId, ServerName,
|
||||
ServerSigningKeyId,
|
||||
api::federation::discovery::{ServerSigningKeys, VerifyKey},
|
||||
CanonicalJsonObject, MilliSecondsSinceUnixEpoch, OwnedServerName, OwnedServerSigningKeyId,
|
||||
ServerName, ServerSigningKeyId,
|
||||
api::federation::discovery::{OldVerifyKey, ServerSigningKeys, VerifyKey},
|
||||
room_version_rules::RoomVersionRules,
|
||||
serde::Raw,
|
||||
signatures::{Ed25519KeyPair, PublicKeyMap, PublicKeySet},
|
||||
};
|
||||
use verify::IncomingServerKeys;
|
||||
use serde_json::value::to_raw_value;
|
||||
pub use verify::strip_extraneous_signatures;
|
||||
|
||||
use crate::{Dep, globals, sending, server_keys::util::required_keys};
|
||||
|
||||
const VALID_UNTIL_TS_DURATION: Duration = Duration::from_hours(12);
|
||||
|
||||
pub struct Service {
|
||||
keypair: Box<Ed25519KeyPair>,
|
||||
verify_keys: VerifyKeys,
|
||||
services: Services,
|
||||
db: Data,
|
||||
last_lookup: SyncRwLock<HashMap<OwnedServerName, Instant>>,
|
||||
}
|
||||
|
||||
struct Services {
|
||||
@@ -47,6 +58,7 @@ pub type VerifyKeys = BTreeMap<OwnedServerSigningKeyId, VerifyKey>;
|
||||
pub type PubKeyMap = PublicKeyMap;
|
||||
pub type PubKeys = PublicKeySet;
|
||||
|
||||
#[async_trait]
|
||||
impl crate::Service for Service {
|
||||
fn build(args: crate::Args<'_>) -> Result<Arc<Self>> {
|
||||
let (keypair, verify_keys) = keypair::init(args.db)?;
|
||||
@@ -63,9 +75,12 @@ impl crate::Service for Service {
|
||||
db: Data {
|
||||
servernamekeyid_response: args.db["servernamekeyid_response"].clone(),
|
||||
},
|
||||
last_lookup: SyncRwLock::new(HashMap::new()),
|
||||
}))
|
||||
}
|
||||
|
||||
async fn clear_cache(&self) { self.last_lookup.write().clear(); }
|
||||
|
||||
fn name(&self) -> &str { crate::service::make_name(std::module_path!()) }
|
||||
}
|
||||
|
||||
@@ -133,7 +148,9 @@ impl Service {
|
||||
key_id: &ServerSigningKeyId,
|
||||
minimum_valid_ts: MilliSecondsSinceUnixEpoch,
|
||||
) -> bool {
|
||||
let Some(keys) = self.get_signing_key(origin, key_id).await else {
|
||||
let Some(IncomingServerKeys { parsed: keys, .. }) =
|
||||
self.get_signing_key(origin, key_id).await
|
||||
else {
|
||||
// We have no keys for this server
|
||||
return false;
|
||||
};
|
||||
@@ -161,12 +178,13 @@ impl Service {
|
||||
&self,
|
||||
origin: &ServerName,
|
||||
key_id: &ServerSigningKeyId,
|
||||
) -> Option<ServerSigningKeys> {
|
||||
) -> Option<IncomingServerKeys> {
|
||||
self.db
|
||||
.servernamekeyid_response
|
||||
.qry(&(origin.as_str(), key_id.as_str()))
|
||||
.await
|
||||
.deserialized::<ServerSigningKeys>()
|
||||
.deserialized::<Raw<ServerSigningKeys>>()
|
||||
.and_then(|r| r.try_into().map_err(Into::into))
|
||||
.ok()
|
||||
}
|
||||
|
||||
@@ -188,6 +206,8 @@ impl Service {
|
||||
}
|
||||
|
||||
/// Returns the stored server signing keys responses for the origin.
|
||||
///
|
||||
/// Does not imply that the stored responses are still in-date.
|
||||
pub fn signing_keys_for<'a>(
|
||||
&'a self,
|
||||
origin: &'a ServerName,
|
||||
@@ -199,4 +219,114 @@ impl Service {
|
||||
.map(|(_, v): (Ignore, Raw<ServerSigningKeys>)| v.try_into().map_err(Into::into))
|
||||
.ignore_err()
|
||||
}
|
||||
|
||||
/// Determines if the server may contact the origin server to fetch keys
|
||||
/// when acting as a notary server. This limits origin lookups to once per
|
||||
/// minute, which prevents amplification attacks.
|
||||
#[must_use]
|
||||
pub fn origin_not_contacted_recently(&self, server_name: &ServerName) -> bool {
|
||||
if server_name == self.services.server.name {
|
||||
// We always intercept origin requests to us with
|
||||
// build_server_keys_response, so this is equivalent to
|
||||
// calling `/_matrix/key/v2/server`.
|
||||
return true;
|
||||
}
|
||||
self.last_lookup
|
||||
.read()
|
||||
.get(server_name)
|
||||
.is_none_or(|last| last.elapsed() >= Duration::from_mins(1))
|
||||
}
|
||||
|
||||
/// Generates a signing key response to serve to `/_matrix/key/v2/server`.
|
||||
pub async fn build_server_keys_response(&self) -> Result<Raw<ServerSigningKeys>> {
|
||||
let verify_keys = BTreeMap::from([self.active_verify_key()]);
|
||||
let old_verify_keys = match &self.services.server.config.old_verify_keys {
|
||||
| Some(old_verify_keys) => old_verify_keys.to_owned(),
|
||||
| None => self.discover_old_signing_keys().await,
|
||||
};
|
||||
let valid_until_ts = timepoint_from_now(VALID_UNTIL_TS_DURATION)
|
||||
.ok()
|
||||
.and_then(MilliSecondsSinceUnixEpoch::from_system_time)
|
||||
.expect("key validity period must be before the heat death of the universe");
|
||||
let server_keys = assign!(
|
||||
ServerSigningKeys::new(self.services.server.name.clone(), valid_until_ts),
|
||||
{verify_keys, old_verify_keys}
|
||||
);
|
||||
let mut canonical_obj = to_canonical_object(&server_keys)?;
|
||||
self.sign_json(&mut canonical_obj)
|
||||
.and_then(|()| to_raw_value(&canonical_obj).map_err(Into::into))
|
||||
.map(Raw::from_json)
|
||||
}
|
||||
|
||||
async fn discover_old_signing_keys(&self) -> BTreeMap<OwnedServerSigningKeyId, OldVerifyKey> {
|
||||
let now = MilliSecondsSinceUnixEpoch::now();
|
||||
let mut keys = self.signing_keys_for(&self.services.server.name);
|
||||
let mut old_keys = BTreeMap::new();
|
||||
while let Some(resp) = keys.next().await {
|
||||
// We need to verify that this response is still trusted based on
|
||||
// the current configuration. It's possible we got this response
|
||||
// from a notary who we no longer trust.
|
||||
if resp.parsed.valid_until_ts > in_one_week() || resp.parsed.valid_until_ts < now {
|
||||
continue;
|
||||
}
|
||||
let trusted = self
|
||||
.services
|
||||
.server
|
||||
.config
|
||||
.trusted_servers
|
||||
.iter()
|
||||
.any(|notary| {
|
||||
Self::verify_server_keys_response(
|
||||
&resp,
|
||||
Some((notary.server_name(), notary.verify_keys())),
|
||||
)
|
||||
.is_ok()
|
||||
});
|
||||
if !trusted {
|
||||
continue;
|
||||
}
|
||||
for (old_key_id, old_key) in resp.parsed.old_verify_keys {
|
||||
if old_key.expired_ts > resp.parsed.valid_until_ts {
|
||||
// This key expired in the future which is probably illegal
|
||||
continue;
|
||||
}
|
||||
old_keys
|
||||
.entry(old_key_id)
|
||||
.and_modify(|current_old_key: &mut OldVerifyKey| {
|
||||
// Use the lowest expiry timestamp
|
||||
if current_old_key.expired_ts > old_key.expired_ts {
|
||||
*current_old_key = old_key.clone();
|
||||
}
|
||||
})
|
||||
.or_insert(old_key);
|
||||
}
|
||||
}
|
||||
|
||||
old_keys
|
||||
}
|
||||
|
||||
/// Canonicalize and sign another server's signing keys.
|
||||
pub fn self_sign_signing_keys(
|
||||
&self,
|
||||
remote_server: &ServerName,
|
||||
remote_keys: &Raw<ServerSigningKeys>,
|
||||
) -> Result<Raw<ServerSigningKeys>> {
|
||||
let this_server = self.services.globals.server_name();
|
||||
|
||||
let mut canonical = to_canonical_object(remote_keys)?;
|
||||
|
||||
if remote_server == this_server {
|
||||
debug_info!(
|
||||
%remote_server,
|
||||
object=?remote_keys,
|
||||
"Refusing to sign our own signing keys response (should already be signed)"
|
||||
);
|
||||
} else {
|
||||
self.sign_json(&mut canonical)?;
|
||||
|
||||
strip_extraneous_signatures(&mut canonical, remote_server, &[this_server]);
|
||||
}
|
||||
|
||||
Ok(Raw::<ServerSigningKeys>::from_json(to_raw_value(&canonical)?))
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
use std::collections::BTreeMap;
|
||||
use std::{collections::BTreeMap, time::Instant};
|
||||
|
||||
use conduwuit::{Err, Result, trace, utils::millis_since_unix_epoch, warn};
|
||||
use ruma::{
|
||||
@@ -31,6 +31,23 @@ impl super::Service {
|
||||
) -> Result<IncomingServerKeys> {
|
||||
use get_server_keys::v2::Request;
|
||||
|
||||
if target == self.services.server.name {
|
||||
return self
|
||||
.build_server_keys_response()
|
||||
.await
|
||||
.and_then(|r| r.try_into().map_err(Into::into));
|
||||
}
|
||||
|
||||
// N.B. The "last lookup" is written before the request is actually made
|
||||
// to prevent concurrent notary requests from spawning... concurrent
|
||||
// origin requests, especially if the origin is slow.
|
||||
// This has the downside that, if the origin is temporarily unreachable
|
||||
// (including if we're backing off from it), the notary might take an
|
||||
// additional minute to recover compared to the rest of the server. This
|
||||
// is deemed acceptable.
|
||||
self.last_lookup
|
||||
.write()
|
||||
.insert(target.clone(), Instant::now());
|
||||
let raw_server_key = self
|
||||
.services
|
||||
.sending
|
||||
@@ -66,6 +83,8 @@ impl super::Service {
|
||||
)));
|
||||
}
|
||||
|
||||
self.add_signing_keys(&server_signing_key);
|
||||
|
||||
Ok(server_signing_key)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ use conduwuit::{
|
||||
Err, Result, matrix::event::gen_event_id_canonical_json, trace, utils::to_canonical_object,
|
||||
};
|
||||
use ruma::{
|
||||
CanonicalJsonObject, CanonicalJsonValue, OwnedEventId, ServerName, SigningKeyAlgorithm,
|
||||
CanonicalJsonObject, CanonicalJsonValue, OwnedEventId, ServerName, ServerSigningKeyId,
|
||||
SigningKeyAlgorithm,
|
||||
api::federation::discovery::ServerSigningKeys,
|
||||
room_version_rules::RoomVersionRules,
|
||||
serde::{Base64, Raw, base64::Standard},
|
||||
@@ -35,6 +36,17 @@ impl TryFrom<&Raw<ServerSigningKeys>> for IncomingServerKeys {
|
||||
}
|
||||
}
|
||||
|
||||
impl IncomingServerKeys {
|
||||
/// Returns an iterator of every key ID in this key response.
|
||||
pub fn all_key_ids(&self) -> impl Iterator<Item = &ServerSigningKeyId> {
|
||||
self.parsed
|
||||
.verify_keys
|
||||
.keys()
|
||||
.chain(self.parsed.old_verify_keys.keys())
|
||||
.map(|key| &**key)
|
||||
}
|
||||
}
|
||||
|
||||
impl super::Service {
|
||||
/// Validates the incoming event only using locally known verification keys.
|
||||
/// Inserts the calculated event ID into the event_id field upon success.
|
||||
@@ -107,7 +119,7 @@ impl super::Service {
|
||||
pubkey_map.insert(incoming.parsed.server_name.to_string(), set);
|
||||
|
||||
let mut canonical = to_canonical_object(&incoming.raw)?;
|
||||
Self::strip_extraneous_signatures(&mut canonical, &incoming.parsed.server_name, &[]);
|
||||
strip_extraneous_signatures(&mut canonical, &incoming.parsed.server_name, &[]);
|
||||
ruma::signatures::verify_json(&pubkey_map, &canonical).map_err(Into::into)
|
||||
}
|
||||
|
||||
@@ -163,22 +175,30 @@ impl super::Service {
|
||||
"No valid signature from {notary_name} present on signing keys response"
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
fn strip_extraneous_signatures(
|
||||
canonical: &mut CanonicalJsonObject,
|
||||
origin: &ServerName,
|
||||
notaries: &[&ServerName],
|
||||
) {
|
||||
canonical.entry("signatures".to_owned()).and_modify(|sigs| {
|
||||
sigs.as_object_mut().map(|s| {
|
||||
s.retain(|server_name, _| {
|
||||
let Ok(server_name) = ServerName::parse(server_name) else { return false };
|
||||
origin == server_name || notaries.iter().any(|ns| *ns == server_name)
|
||||
});
|
||||
Some(s)
|
||||
/// Removes extraneous signatures from the signature map. This is done to avoid
|
||||
/// leaking the signatures from notaries we've used, in case the response is
|
||||
/// being forwarded to a third party. This also reduces the risk of accidentally
|
||||
/// trusting a notary's signature as the origin's signature if `notaries` is
|
||||
/// empty.
|
||||
///
|
||||
/// Infallible & mutates the original canonical JSON object. Signatures by
|
||||
/// server names that cannot be parsed are always removed.
|
||||
pub fn strip_extraneous_signatures(
|
||||
canonical: &mut CanonicalJsonObject,
|
||||
origin: &ServerName,
|
||||
notaries: &[&ServerName],
|
||||
) {
|
||||
canonical.entry("signatures".to_owned()).and_modify(|sigs| {
|
||||
sigs.as_object_mut().map(|s| {
|
||||
s.retain(|server_name, _| {
|
||||
let Ok(server_name) = ServerName::parse(server_name) else { return false };
|
||||
origin == server_name || notaries.iter().any(|ns| *ns == server_name)
|
||||
});
|
||||
Some(s)
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -632,6 +632,12 @@ impl super::Service {
|
||||
}
|
||||
}
|
||||
|
||||
// Discard this device's previous token entry if the current token
|
||||
// isn't expired.
|
||||
self.db
|
||||
.userdeviceid_previoustoken
|
||||
.del((&user_id, &device_id));
|
||||
|
||||
Some((user_id, device_id, AccessTokenStatus::Valid))
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,18 @@ use serde_json::json;
|
||||
|
||||
use crate::users::increment;
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum PreviousTokenAction {
|
||||
/// Discard any previously saved access token for this device.
|
||||
Clear,
|
||||
/// Save the replaced access token as the previous token, overwriting any
|
||||
/// existing one.
|
||||
Replace,
|
||||
/// Keep an existing previous access token if one is already saved;
|
||||
/// otherwise save the replaced access token.
|
||||
Preserve,
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[derive(Clone)]
|
||||
pub struct DeviceToken {
|
||||
@@ -71,7 +83,8 @@ impl super::Service {
|
||||
self.db.userdeviceid_metadata.put(key, Json(device));
|
||||
|
||||
if let Some(token) = token {
|
||||
self.set_token(user_id, &device_id, token).await?;
|
||||
self.set_token(user_id, &device_id, token, PreviousTokenAction::Clear)
|
||||
.await?;
|
||||
}
|
||||
|
||||
Ok(device_id)
|
||||
@@ -92,6 +105,7 @@ impl super::Service {
|
||||
self.db.token_userdeviceid.remove(&old_token);
|
||||
self.db.userdeviceid_tokenexpires.del(userdeviceid);
|
||||
}
|
||||
self.db.userdeviceid_previoustoken.del(userdeviceid);
|
||||
|
||||
// Remove todevice events
|
||||
let prefix = (user_id, device_id, Interfix);
|
||||
@@ -164,6 +178,7 @@ impl super::Service {
|
||||
user_id: &UserId,
|
||||
device_id: &DeviceId,
|
||||
DeviceToken { token, max_age }: DeviceToken,
|
||||
previous_token_action: PreviousTokenAction,
|
||||
) -> Result<()> {
|
||||
let key = (user_id, device_id);
|
||||
if self.db.userdeviceid_metadata.qry(&key).await.is_err() {
|
||||
@@ -184,8 +199,23 @@ impl super::Service {
|
||||
// Remove old token
|
||||
if let Ok(old_token) = self.db.userdeviceid_token.qry(&key).await {
|
||||
self.db.token_userdeviceid.remove(&old_token);
|
||||
self.db.userdeviceid_tokenexpires.remove(&old_token);
|
||||
// It will be removed from userdeviceid_token by the insert later
|
||||
|
||||
match previous_token_action {
|
||||
| PreviousTokenAction::Clear => {
|
||||
self.db.userdeviceid_previoustoken.del(key);
|
||||
},
|
||||
| PreviousTokenAction::Replace => {
|
||||
self.db.userdeviceid_previoustoken.put_raw(key, &old_token);
|
||||
},
|
||||
| PreviousTokenAction::Preserve => {
|
||||
if !self.db.userdeviceid_previoustoken.contains(&key).await {
|
||||
self.db.userdeviceid_previoustoken.put_raw(key, &old_token);
|
||||
}
|
||||
},
|
||||
}
|
||||
} else if matches!(previous_token_action, PreviousTokenAction::Clear) {
|
||||
self.db.userdeviceid_previoustoken.del(key);
|
||||
}
|
||||
|
||||
// Assign token to user device combination
|
||||
@@ -207,6 +237,17 @@ impl super::Service {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Returns whether the provided token was previously used by a device
|
||||
/// before a token refresh, and therefore should cause a soft-logout.
|
||||
pub async fn is_previous_token(&self, token: &str) -> bool {
|
||||
self.db
|
||||
.userdeviceid_previoustoken
|
||||
.stream::<Ignore, String>()
|
||||
.ignore_err()
|
||||
.ready_any(|(_, previous_token)| previous_token == token)
|
||||
.await
|
||||
}
|
||||
|
||||
/// Pushes a new to-device event into a device's inbox.
|
||||
pub async fn add_to_device_event(
|
||||
&self,
|
||||
|
||||
@@ -11,7 +11,7 @@ use std::{mem, sync::Arc};
|
||||
pub use account::{AccessTokenStatus, AccountStatus};
|
||||
use conduwuit::{Err, Error, Result, err, utils};
|
||||
use database::Map;
|
||||
pub use device::DeviceToken;
|
||||
pub use device::{DeviceToken, PreviousTokenAction};
|
||||
pub use profile::ProfileFieldChange;
|
||||
use ruma::{UserId, api::error::ErrorKind, encryption::CrossSigningKey, serde::Raw};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -83,6 +83,7 @@ struct Data {
|
||||
userdeviceid_tokenexpires: Arc<Map>,
|
||||
userdeviceid_metadata: Arc<Map>,
|
||||
userdeviceid_token: Arc<Map>,
|
||||
userdeviceid_previoustoken: Arc<Map>,
|
||||
userfilterid_filter: Arc<Map>,
|
||||
userid_avatarurl: Arc<Map>,
|
||||
userid_deactivated: Arc<Map>,
|
||||
@@ -134,6 +135,7 @@ impl crate::Service for Service {
|
||||
remoteuserid_remoteuser: args.db["remoteuserid_remoteuser"].clone(),
|
||||
userdeviceid_metadata: args.db["userdeviceid_metadata"].clone(),
|
||||
userdeviceid_token: args.db["userdeviceid_token"].clone(),
|
||||
userdeviceid_previoustoken: args.db["userdeviceid_previoustoken"].clone(),
|
||||
userfilterid_filter: args.db["userfilterid_filter"].clone(),
|
||||
userid_avatarurl: args.db["userid_avatarurl"].clone(),
|
||||
userid_deactivated: args.db["userid_deactivated"].clone(),
|
||||
|
||||
Reference in new issue
Block a user