A token that is passwordless, has a username template and has no email
address pinned or allowed registers with only a display name. That
condition was called an invite link, though every token has an invite
link (`invite_url`), and a link listing the addresses allowed to use it
didn't count as one. It is now `registers_without_email()`, and
`without_email` on the registration page.
The page's other names drop the guest and link wording for what MAS
checks: `passwordless` for any valid passwordless token, with the
heading strings and the login link's prop named the same way. What the
page says is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJcZUXYbZ74Y9v5jZ7y
With a token listing the addresses it allows, `POST /register` refuses
any other with an error on the email field, before a code is sent, and
the island explains it without naming the listed addresses.
One check on the token covers a pinned address and a list, in
`POST /register`, the token step and the last checks when finishing.
The last two read the token as it stands then, so a list replaced while
a registration is under way applies to it. `invite-emails` sends a
listed token only to an address on its list.
A passwordless token with a list skips the registration rate limit, as
one with a pinned email does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJYpWHZUTqexCFxqUAq
Design alignment for the Guest-XP Figma, not for merge.
An invite link (passwordless token, username template, no pinned email)
registers a guest with a display name and no email: the first step asks
for the display name, finish skips the email code and the display-name
step. It names no address, so it stays under the per-IP registration
rate limit. Email invites only get the new heading, subtitle and icon.
A token listing the addresses allowed to use it isn't an invite link, so
the people it invites type and verify one of those addresses, and none
of them registers without one.
Co-Authored-By: Devon Hudson <devon.dmytro@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJYpWHZUTqexCFxqUAq
The endpoint emails the invite links of registration tokens minted
through the token API: to the token's own address, or to one given for
a token without an address. The links are only ever mailed, so the
response carries a count rather than the links.
Everything is checked before anything is scheduled, so a rejected
request sends no email at all: each token must exist and be valid, and
an address given for a token with one must be the token's, ignoring
case. A token and address given more than once, ignoring case, are
emailed once. The sends are spread 100 ms apart, so a large batch
doesn't burst against the SMTP server.
The caller sends the room name and the inviter on the inviter's behalf,
so the endpoint doesn't trust them. The room name and the inviter's
display name are stripped of control characters, including the
bidirectional controls `char::is_control` misses, and truncated before
they are stored in the job payload. The inviter's Matrix ID is never
truncated, so it can't show a server it isn't from: it is kept whole if
it is valid under the historical grammar, and left out otherwise.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJbETzs7DLgqpMfkYtG
`PUT /api/admin/v1/user-registration-tokens/{id}` takes `allowed_emails`,
which replaces the whole list, with the checks it gets when minting, and
null removes it. A token pinning an email, or one that isn't
passwordless, can't get a list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
`allowed_emails` lists the addresses that may register with the token.
Each must be an address the registration policy accepts, as a pinned
email must, and repeats in another case are dropped. A token pins an
email or lists addresses, not both, and only a passwordless token
lists them. The admin API shows the list on every token.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
A token's `username` containing `{` is a minijinja template, rendered
when registering with `random` set to 32 lowercase letters and digits.
Localparts can't contain `{`, so no username a token could otherwise
pin is read as one.
Adding a token checks a template by rendering it with a sample `random`,
in strict mode so an unknown variable is an error rather than an empty
string, and runs the registration policy on the result. A template that
doesn't render is a 400 carrying the render error. The name a template
renders to is only known when registering, so the username-taken check
applies to literal usernames only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
A registration token can now carry a URL, for its link to send the user
to once they have registered or signed in. The admin API takes
`continue_url` when adding a token and reports it on every token. It
refuses anything but an http or https URL, and keeps the URL as given.
MAS doesn't read the URL. Whoever mints the token decides where it
leads, such as a room in a web client, or a page that lets the user
pick a client.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJbETzs7DLgqpMfkYtG
Every registration token the admin API returns now carries `invite_url`,
the `/register?token=…` link which opens the registration page with that
token, so that an admin client can hand it to the invitee as is. The
token endpoints take the `UrlBuilder` to build it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
A registration token can now be marked `passwordless`, which will let the
user register without picking a password: their identity is established
by verifying their email address instead. The admin API takes the flag
when creating a token and reports it on every token it returns, and
`manage issue-user-registration-token` takes `--passwordless`.
This only stores the flag; the registration flow doesn't use it yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
A registration token can now carry the username and the email address
the account registered with it has to use. The admin API takes both when
creating a token and reports them on every token it returns, and
`manage issue-user-registration-token` takes `--username` and `--email`.
The admin API checks the pins when a token is created, so that it
doesn't mint a token nobody can register with: a pinned email must
parse, both must pass the registration policy, and a pinned username
must not be taken already.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
An unset `telemetry.sentry.traces_sample_rate` used to mean a rate of
0.0, which still records the transaction of any request carrying a
sampled `sentry-trace` header. Since any client can send that header,
leaving the option unset now disables tracing entirely. Setting it to
0.0 explicitly keeps the previous behaviour.
Exposes a new query telling whether a given username is available for
registration, and if not, why: already taken, or rejected by the
registration policy. A username reserved on the homeserver side is
deliberately reported as taken, mirroring the ambiguity of the
registration form, which doesn't tell the two apart either.
Because the query reveals whether a username exists, it is rate-limited
per requester, configurable through the new
`rate_limiting.username_availability` option.
Add a dedicated `device_code_link` rate limiter for device authorization user code verification.
This is to help mitigate the User Code Brute Forcing attack as described by [RFC 8628 section 5.1](https://datatracker.ietf.org/doc/html/rfc8628#section-5.1)
Proposed default is 1 per minute and burst of 10. This can be overridden by the server admin.
`pnpm/setup` reads the runtime version from `package.json` and ignores `.node-version`. With `onFail: download`, pnpm records Node 24.15.0 in the lockfile and downloads it on every install unless `--no-runtime` is passed. The Dockerfile and the docs build pass it, since they already run a pinned Node. `.node-version` stays for the Cloudflare Pages build, which reads it to pick the Node that bootstraps corepack.
The page said encrypted bridges cannot work with MAS and that a solution
was being worked on. That solution is MSC4190, stable since Matrix 1.17
and enabled for every application service in Synapse 1.141.0, so the
limitation no longer exists.
Replace the page with a readiness item on the migration page, which is
where the original warning was aimed, and redirect the old URL there.
Matrix 1.17 requires servers that don't support the legacy
authentication API to reject `m.login.application_service` on
`/login` with a 400 and the `M_APPSERVICE_LOGIN_UNSUPPORTED` error
code. Previously this login type fell through the generic unsupported
credentials path and returned `M_UNKNOWN`, which appservices written
against Matrix 1.17 can't distinguish from an unrelated failure.
Until now only the clippy CI job and the Dockerfile named a Rust version (kept in sync by hand), while every other CI job, the release binaries and the docs build ran on whatever `stable` happened to be that day. Rust 1.98.0 landing on 2026-08-20 broke `build-binaries` overnight because of that (#5935).
`rust-toolchain.toml` pins 1.96.0 with the `minimal` profile plus clippy, and every `rustup toolchain install stable ...` in CI becomes a bare `rustup toolchain install`, which reads the file. Starting at 1.96.0 (the version clippy is already clean against) keeps this change free of lint churn; catching up to 1.98.0 is a follow-up.
rustfmt stays on nightly because `.rustfmt.toml` uses nightly-only options, so that job now invokes `cargo +nightly fmt` explicitly instead of setting a rustup directory override, which would silently take precedence over the toolchain file.
The file does not list the linux cross-compilation targets on purpose: that would make every developer and CI job download `rust-std` they never use. The two consumers that cross-compile add the targets themselves.
The interactive playground page and its route/config option are gone; the GraphQL API itself (POST /graphql) is unaffected. External GraphQL usage is deprecated anyway in favour of the REST admin API.
Fixes#5572Fixes#2424
This makes it so that MAS binds on a temporary path on startup, sets
permissions and then moves it to the configured path. This means that we don't
error out anymore if there is a stale socket file, and that it is safe to
rollout a new process without killing the old one first, without breaking
connections.