diff --git a/CHANGES.md b/CHANGES.md index 4df8e869a..ee608194d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,39 @@ # Changelog +## Dendrite 0.6.4 (2022-02-21) + +### Features + +* All Client-Server API endpoints are now available under the `/v3` namespace +* The `/whoami` response format now matches the latest Matrix spec version +* Support added for the `/context` endpoint, which should help clients to render quote-replies correctly +* Accounts now have an optional account type field, allowing admin accounts to be created +* Server notices are now supported +* Refactored the user API storage to deduplicate a significant amount of code, as well as merging both user API databases into a single database + * The account database is now used for all user API storage and the device database is now obsolete + * For some installations that have separate account and device databases, this may result in access tokens being revoked and client sessions being logged out — users may need to log in again + * The above can be avoided by moving the `device_devices` table into the account database manually +* Guest registration can now be separately disabled with the new `client_api.guests_disabled` configuration option +* Outbound connections now obey proxy settings from the environment, deprecating the `federation_api.proxy_outbound` configuration options + +### Fixes + +* The roomserver input API will now strictly consume only one database transaction per room, which should prevent situations where the roomserver can deadlock waiting for database connections to become available +* Room joins will now fall back to federation if the local room state is insufficient to create a membership event +* Create events are now correctly filtered from federation `/send` transactions +* Excessive logging when federation is disabled should now be fixed +* Dendrite will no longer panic if trying to retire an invite event that has not been seen yet +* The device list updater will now wait for longer after a connection issue, rather than flooding the logs with errors +* The device list updater will no longer produce unnecessary output events for federated key updates with no changes, which should help to reduce CPU usage +* Local device name changes will now generate key change events correctly +* The sync API will now try to share device list update notifications even if all state key NIDs cannot be fetched +* An off-by-one error in the sync stream token handling which could result in a crash has been fixed +* State events will no longer be re-sent unnecessary by the roomserver to other components if they have already been sent, which should help to reduce the NATS message sizes on the roomserver output topic in some cases +* The roomserver input API now uses the process context and should handle graceful shutdowns better +* Guest registration is now correctly disabled when the `client_api.registration_disabled` configuration option is set +* One-time encryption keys are now cleaned up correctly when a device is logged out or removed +* Invalid state snapshots in the state storage refactoring migration are now reset rather than causing a panic at startup + ## Dendrite 0.6.3 (2022-02-10) ### Features diff --git a/internal/version.go b/internal/version.go index a07f01b61..2ea1c5201 100644 --- a/internal/version.go +++ b/internal/version.go @@ -17,7 +17,7 @@ var build string const ( VersionMajor = 0 VersionMinor = 6 - VersionPatch = 3 + VersionPatch = 4 VersionTag = "" // example: "rc1" ) diff --git a/keyserver/internal/device_list_update.go b/keyserver/internal/device_list_update.go index b208f0ce5..974d0196b 100644 --- a/keyserver/internal/device_list_update.go +++ b/keyserver/internal/device_list_update.go @@ -224,7 +224,7 @@ func (u *DeviceListUpdater) update(ctx context.Context, event gomatrixserverlib. }).Info("DeviceListUpdater.Update") // if we haven't missed anything update the database and notify users - if exists { + if exists || event.Deleted { k := event.Keys if event.Deleted { k = nil @@ -267,7 +267,7 @@ func (u *DeviceListUpdater) update(ctx context.Context, event gomatrixserverlib. return false, fmt.Errorf("failed to store remote device keys for %s (%s): %w", event.UserID, event.DeviceID, err) } - if err = emitDeviceKeyChanges(u.producer, existingKeys, keys); err != nil { + if err = emitDeviceKeyChanges(u.producer, existingKeys, keys, false); err != nil { return false, fmt.Errorf("failed to produce device key changes for %s (%s): %w", event.UserID, event.DeviceID, err) } return false, nil @@ -473,7 +473,7 @@ func (u *DeviceListUpdater) updateDeviceList(res *gomatrixserverlib.RespUserDevi if err != nil { return fmt.Errorf("failed to mark device list as fresh: %w", err) } - err = emitDeviceKeyChanges(u.producer, existingKeys, keys) + err = emitDeviceKeyChanges(u.producer, existingKeys, keys, false) if err != nil { return fmt.Errorf("failed to emit key changes for fresh device list: %w", err) } diff --git a/keyserver/internal/internal.go b/keyserver/internal/internal.go index dc3c404bd..0a8bef95d 100644 --- a/keyserver/internal/internal.go +++ b/keyserver/internal/internal.go @@ -648,7 +648,7 @@ func (a *KeyInternalAPI) uploadLocalDeviceKeys(ctx context.Context, req *api.Per } return } - err = emitDeviceKeyChanges(a.Producer, existingKeys, keysToStore) + err = emitDeviceKeyChanges(a.Producer, existingKeys, keysToStore, req.OnlyDisplayNameUpdates) if err != nil { util.GetLogger(ctx).Errorf("Failed to emitDeviceKeyChanges: %s", err) } @@ -710,7 +710,11 @@ func (a *KeyInternalAPI) uploadOneTimeKeys(ctx context.Context, req *api.Perform } -func emitDeviceKeyChanges(producer KeyChangeProducer, existing, new []api.DeviceMessage) error { +func emitDeviceKeyChanges(producer KeyChangeProducer, existing, new []api.DeviceMessage, onlyUpdateDisplayName bool) error { + // if we only want to update the display names, we can skip the checks below + if onlyUpdateDisplayName { + return producer.ProduceKeyChanges(new) + } // find keys in new that are not in existing var keysAdded []api.DeviceMessage for _, newKey := range new { diff --git a/sytest-whitelist b/sytest-whitelist index fff8bc4af..6e76edd69 100644 --- a/sytest-whitelist +++ b/sytest-whitelist @@ -598,4 +598,7 @@ Device list doesn't change if remote server is down /context/ returns correct number of events /context/ with lazy_load_members filter works GET /rooms/:room_id/messages lazy loads members correctly +Can query remote device keys using POST after notification +Device deletion propagates over federation +Get left notifs in sync and /keys/changes when other user leaves Remote banned user is kicked and may not rejoin until unbanned