Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 0312266

Browse files
committed
Merge tag 'v1.25.0rc1' into develop
Synapse 1.25.0rc1 (2021-01-06) ============================== Removal warning --------------- The old [Purge Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/purge_room.md) and [Shutdown Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/shutdown_room.md) are deprecated and will be removed in a future release. They will be replaced by the [Delete Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/rooms.md#delete-room-api). `POST /_synapse/admin/v1/rooms/<room_id>/delete` replaces `POST /_synapse/admin/v1/purge_room` and `POST /_synapse/admin/v1/shutdown_room/<room_id>`. Features -------- - Add an admin API that lets server admins get power in rooms in which local users have power. ([\#8756](#8756)) - Add optional HTTP authentication to replication endpoints. ([\#8853](#8853)) - Improve the error messages printed as a result of configuration problems for extension modules. ([\#8874](#8874)) - Add the number of local devices to Room Details Admin API. Contributed by @dklimpel. ([\#8886](#8886)) - Add `X-Robots-Tag` header to stop web crawlers from indexing media. Contributed by Aaron Raimist. ([\#8887](#8887)) - Spam-checkers may now define their methods as `async`. ([\#8890](#8890)) - Add support for allowing users to pick their own user ID during a single-sign-on login. ([\#8897](#8897), [\#8900](#8900), [\#8911](#8911), [\#8938](#8938), [\#8941](#8941), [\#8942](#8942), [\#8951](#8951)) - Add an `email.invite_client_location` configuration option to send a web client location to the invite endpoint on the identity server which allows customisation of the email template. ([\#8930](#8930)) - The search term in the list room and list user Admin APIs is now treated as case-insensitive. ([\#8931](#8931)) - Apply an IP range blacklist to push and key revocation requests. ([\#8821](#8821), [\#8870](#8870), [\#8954](#8954)) - Add an option to allow re-use of user-interactive authentication sessions for a period of time. ([\#8970](#8970)) - Allow running the redact endpoint on workers. ([\#8994](#8994)) Bugfixes -------- - Fix bug where we might not correctly calculate the current state for rooms with multiple extremities. ([\#8827](#8827)) - Fix a long-standing bug in the register admin endpoint (`/_synapse/admin/v1/register`) when the `mac` field was not provided. The endpoint now properly returns a 400 error. Contributed by @edwargix. ([\#8837](#8837)) - Fix a long-standing bug on Synapse instances supporting Single-Sign-On, where users would be prompted to enter their password to confirm certain actions, even though they have not set a password. ([\#8858](#8858)) - Fix a longstanding bug where a 500 error would be returned if the `Content-Length` header was not provided to the upload media resource. ([\#8862](#8862)) - Add additional validation to pusher URLs to be compliant with the specification. ([\#8865](#8865)) - Fix the error code that is returned when a user tries to register on a homeserver on which new-user registration has been disabled. ([\#8867](#8867)) - Fix a bug where `PUT /_synapse/admin/v2/users/<user_id>` failed to create a new user when `avatar_url` is specified. Bug introduced in Synapse v1.9.0. ([\#8872](#8872)) - Fix a 500 error when attempting to preview an empty HTML file. ([\#8883](#8883)) - Fix occasional deadlock when handling SIGHUP. ([\#8918](#8918)) - Fix login API to not ratelimit application services that have ratelimiting disabled. ([\#8920](#8920)) - Fix bug where we ratelimited auto joining of rooms on registration (using `auto_join_rooms` config). ([\#8921](#8921)) - Fix a bug where deactivated users appeared in the user directory when their profile information was updated. ([\#8933](#8933), [\#8964](#8964)) - Fix bug introduced in Synapse v1.24.0 which would cause an exception on startup if both `enabled` and `localdb_enabled` were set to `False` in the `password_config` setting of the configuration file. ([\#8937](#8937)) - Fix a bug where 500 errors would be returned if the `m.room_history_visibility` event had invalid content. ([\#8945](#8945)) - Fix a bug causing common English words to not be considered for a user directory search. ([\#8959](#8959)) - Fix bug where application services couldn't register new ghost users if the server had reached its MAU limit. ([\#8962](#8962)) - Fix a long-standing bug where a `m.image` event without a `url` would cause errors on push. ([\#8965](#8965)) - Fix a small bug in v2 state resolution algorithm, which could also cause performance issues for rooms with large numbers of power levels. ([\#8971](#8971)) - Add validation to the `sendToDevice` API to raise a missing parameters error instead of a 500 error. ([\#8975](#8975)) - Add validation of group IDs to raise a 400 error instead of a 500 eror. ([\#8977](#8977)) Improved Documentation ---------------------- - Fix the "Event persist rate" section of the included grafana dashboard by adding missing prometheus rules. ([\#8802](#8802)) - Combine related media admin API docs. ([\#8839](#8839)) - Fix an error in the documentation for the SAML username mapping provider. ([\#8873](#8873)) - Clarify comments around template directories in `sample_config.yaml`. ([\#8891](#8891)) - Moved instructions for database setup, adjusted heading levels and improved syntax highlighting in [INSTALL.md](../INSTALL.md). Contributed by fossterer. ([\#8987](#8987)) - Update the example value of `group_creation_prefix` in the sample configuration. ([\#8992](#8992)) - Link the Synapse developer room to the development section in the docs. ([\#9002](#9002)) Deprecations and Removals ------------------------- - Deprecate Shutdown Room and Purge Room Admin APIs. ([\#8829](#8829)) Internal Changes ---------------- - Properly store the mapping of external ID to Matrix ID for CAS users. ([\#8856](#8856), [\#8958](#8958)) - Remove some unnecessary stubbing from unit tests. ([\#8861](#8861)) - Remove unused `FakeResponse` class from unit tests. ([\#8864](#8864)) - Pass `room_id` to `get_auth_chain_difference`. ([\#8879](#8879)) - Add type hints to push module. ([\#8880](#8880), [\#8882](#8882), [\#8901](#8901), [\#8940](#8940), [\#8943](#8943), [\#9020](#9020)) - Simplify logic for handling user-interactive-auth via single-sign-on servers. ([\#8881](#8881)) - Skip the SAML tests if the requirements (`pysaml2` and `xmlsec1`) aren't available. ([\#8905](#8905)) - Fix multiarch docker image builds. ([\#8906](#8906)) - Don't publish `latest` docker image until all archs are built. ([\#8909](#8909)) - Various clean-ups to the structured logging and logging context code. ([\#8916](#8916), [\#8935](#8935)) - Automatically drop stale forward-extremities under some specific conditions. ([\#8929](#8929)) - Refactor test utilities for injecting HTTP requests. ([\#8946](#8946)) - Add a maximum size of 50 kilobytes to .well-known lookups. ([\#8950](#8950)) - Fix bug in `generate_log_config` script which made it write empty files. ([\#8952](#8952)) - Clean up tox.ini file; disable coverage checking for non-test runs. ([\#8963](#8963)) - Add type hints to the admin and room list handlers. ([\#8973](#8973)) - Add type hints to the receipts and user directory handlers. ([\#8976](#8976)) - Drop the unused `local_invites` table. ([\#8979](#8979)) - Add type hints to the base storage code. ([\#8980](#8980)) - Support using PyJWT v2.0.0 in the test suite. ([\#8986](#8986)) - Fix `tests.federation.transport.RoomDirectoryFederationTests` and ensure it runs in CI. ([\#8998](#8998)) - Add type hints to the crypto module. ([\#8999](#8999))
2 parents 0248409 + 8f08021 commit 0312266

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+96
-94
lines changed

CHANGES.md

+88-2

changelog.d/8756.feature

-1
This file was deleted.

changelog.d/8802.doc

-1
This file was deleted.

changelog.d/8821.bugfix

-1
This file was deleted.

changelog.d/8827.bugfix

-1
This file was deleted.

changelog.d/8829.removal

-1
This file was deleted.

changelog.d/8837.bugfix

-1
This file was deleted.

changelog.d/8839.doc

-1
This file was deleted.

changelog.d/8853.feature

-1
This file was deleted.

changelog.d/8856.misc

-1
This file was deleted.

changelog.d/8858.bugfix

-1
This file was deleted.

changelog.d/8861.misc

-1
This file was deleted.

changelog.d/8862.bugfix

-1
This file was deleted.

changelog.d/8864.misc

-1
This file was deleted.

changelog.d/8865.bugfix

-1
This file was deleted.

changelog.d/8867.bugfix

-1
This file was deleted.

changelog.d/8870.bugfix

-1
This file was deleted.

changelog.d/8872.bugfix

-1
This file was deleted.

changelog.d/8873.doc

-1
This file was deleted.

changelog.d/8874.feature

-1
This file was deleted.

changelog.d/8879.misc

-1
This file was deleted.

changelog.d/8880.misc

-1
This file was deleted.

changelog.d/8881.misc

-1
This file was deleted.

changelog.d/8882.misc

-1
This file was deleted.

changelog.d/8883.bugfix

-1
This file was deleted.

changelog.d/8886.feature

-1
This file was deleted.

changelog.d/8887.feature

-1
This file was deleted.

changelog.d/8890.feature

-1
This file was deleted.

changelog.d/8891.doc

-1
This file was deleted.

changelog.d/8897.feature

-1
This file was deleted.

changelog.d/8900.feature

-1
This file was deleted.

changelog.d/8901.misc

-1
This file was deleted.

changelog.d/8905.misc

-1
This file was deleted.

changelog.d/8906.misc

-1
This file was deleted.

changelog.d/8909.misc

-1
This file was deleted.

changelog.d/8911.feature

-1
This file was deleted.

changelog.d/8916.misc

-1
This file was deleted.

changelog.d/8918.bugfix

-1
This file was deleted.

changelog.d/8920.bugfix

-1
This file was deleted.

changelog.d/8921.bugfix

-1
This file was deleted.

changelog.d/8929.misc

-1
This file was deleted.

changelog.d/8930.feature

-1
This file was deleted.

changelog.d/8931.feature

-1
This file was deleted.

changelog.d/8933.bugfix

-1
This file was deleted.

changelog.d/8935.misc

-1
This file was deleted.

changelog.d/8937.bugfix

-1
This file was deleted.

changelog.d/8938.feature

-1
This file was deleted.

changelog.d/8940.misc

-1
This file was deleted.

changelog.d/8941.feature

-1
This file was deleted.

changelog.d/8942.feature

-1
This file was deleted.

changelog.d/8943.misc

-1
This file was deleted.

changelog.d/8945.bugfix

-1
This file was deleted.

changelog.d/8946.misc

-1
This file was deleted.

changelog.d/8950.misc

-1
This file was deleted.

changelog.d/8951.feature

-1
This file was deleted.

changelog.d/8952.misc

-1
This file was deleted.

changelog.d/8954.feature

-1
This file was deleted.

changelog.d/8958.misc

-1
This file was deleted.

changelog.d/8959.bugfix

-1
This file was deleted.

changelog.d/8962.bugfix

-1
This file was deleted.

changelog.d/8963.misc

-1
This file was deleted.

changelog.d/8964.bugfix

-1
This file was deleted.

changelog.d/8965.bugfix

-1
This file was deleted.

changelog.d/8970.feature

-1
This file was deleted.

changelog.d/8971.bugfix

-1
This file was deleted.

changelog.d/8973.misc

-1
This file was deleted.

changelog.d/8975.bugfix

-1
This file was deleted.

changelog.d/8976.misc

-1
This file was deleted.

changelog.d/8977.bugfix

-1
This file was deleted.

changelog.d/8979.misc

-1
This file was deleted.

changelog.d/8980.misc

-1
This file was deleted.

changelog.d/8986.misc

-1
This file was deleted.

changelog.d/8987.doc

-1
This file was deleted.

changelog.d/8992.doc

-1
This file was deleted.

changelog.d/8994.feature

-1
This file was deleted.

changelog.d/8998.misc

-1
This file was deleted.

changelog.d/8999.misc

-1
This file was deleted.

changelog.d/9002.doc

-1
This file was deleted.

synapse/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
except ImportError:
4949
pass
5050

51-
__version__ = "1.24.0"
51+
__version__ = "1.25.0rc1"
5252

5353
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
5454
# We import here so that we don't have to install a bunch of deps when

synapse/push/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class PusherConfig:
4040
ts = attr.ib(type=int)
4141
lang = attr.ib(type=Optional[str])
4242
data = attr.ib(type=Optional[JsonDict])
43-
last_stream_ordering = attr.ib(type=Optional[int])
43+
last_stream_ordering = attr.ib(type=int)
4444
last_success = attr.ib(type=Optional[int])
4545
failing_since = attr.ib(type=Optional[int])
4646

synapse/push/emailpusher.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ async def _unsafe_process(self) -> None:
157157
being run.
158158
"""
159159
start = 0 if INCLUDE_ALL_UNREAD_NOTIFS else self.last_stream_ordering
160-
assert start is not None
161160
unprocessed = await self.store.get_unread_push_actions_for_user_in_range_for_email(
162161
self.user_id, start, self.max_stream_ordering
163162
)
@@ -220,12 +219,8 @@ async def _unsafe_process(self) -> None:
220219
)
221220

222221
async def save_last_stream_ordering_and_success(
223-
self, last_stream_ordering: Optional[int]
222+
self, last_stream_ordering: int
224223
) -> None:
225-
if last_stream_ordering is None:
226-
# This happens if we haven't yet processed anything
227-
return
228-
229224
self.last_stream_ordering = last_stream_ordering
230225
pusher_still_exists = await self.store.update_pusher_last_stream_ordering_and_success(
231226
self.app_id,

0 commit comments

Comments
 (0)