1
0
Commit Graph

18753 Commits

Author SHA1 Message Date
Andrew Morgan
8b234fb216 Swap method calls in RoomAccessTestCase.test_change_rules (#64)
Swap these calls around, as the check for changing `restricted` to `unrestricted` will actually change `self.restricted_room` to an unrestricted room.

Do that last, instead of first. Additionally add a comment with a warning.
2020-09-18 11:37:21 +01:00
Mathieu Velten
b8d7ca9946 Make all rooms noisy by default (#60) 2020-09-18 11:35:41 +01:00
Andrew Morgan
3fe1c8485b Make AccessRules use the public rooms directory instead of checking a room's join rules on rule change (#63)
This PR switches several conditions regarding room access rules to check against the status of the room's inclusion in the public room list instead of its join rules.

The code includes a snapshot of https://github.com/matrix-org/synapse/pull/8292, which will likely change in time and need merging in again.
2020-09-18 11:30:36 +01:00
Andrew Morgan
319d07373a Override the power levels defaults, enforce mod requirement for invites, admin requirements for unknown state events (#61)
This PR modifies the `RoomAccessRules` module, an implementation of `ThirdPartyEventRules`, to both:

* Modify the default power levels when creating a room to set:
  - `invite` to be minimum PL50
  - `state_default` to be minimum PL100
* Enforce this when creating the room.
2020-09-11 15:47:09 +01:00
Andrew Morgan
3d1c941a6e RoomAccessRules cleanup (#62)
Various cleanups of the DINUM-specific `RoomAccessRules` module, including:

* Type hints
* Docstring cleanups
* Some code cleanups
2020-09-10 19:04:34 +01:00
Andrew Morgan
ff91a451b1 Add a config option for validating 'next_link' parameters against a domain whitelist (#8275)
This is a config option ported over from DINUM's Sydent: https://github.com/matrix-org/sydent/pull/285

They've switched to validating 3PIDs via Synapse rather than Sydent, and would like to retain this functionality.

This original purpose for this change is phishing prevention. This solution could also potentially be replaced by a similar one to https://github.com/matrix-org/synapse/pull/8004, but across all `*/submit_token` endpoint.

This option may still be useful to enterprise even with that safeguard in place though, if they want to be absolutely sure that their employees don't follow links to other domains.
2020-09-09 13:31:25 +01:00
Andrew Morgan
fedb89a16c Remove duplicated error definitions, likely due to merge 2020-09-02 17:17:29 +01:00
Mathieu Velten
f87bf7e3b9 TO REVERT: add user_id to presence response in client worker (#57)
It's currently expected by the Tchap clients, a fix will be deployed to them later on.
2020-08-18 19:17:57 +02:00
Brendan Abolivier
cdc67dfdc0 Merge pull request #56 from matrix-org/babolivier/dinsic_presence_user_id
Revert "Remove "user_id" from GET /presence. (#7606)"
2020-08-18 12:21:30 +01:00
Brendan Abolivier
3ab19a7d40 Update changelog.d/56.misc
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2020-08-18 11:41:23 +01:00
Brendan Abolivier
6414405034 Changelog 2020-08-18 11:30:11 +01:00
Brendan Abolivier
5fbc0362b5 Revert "Remove "user_id" from GET /presence. (#7606)"
This reverts commit a3fbc23c39.
2020-08-18 11:22:30 +01:00
Andrew Morgan
b90ecbe9e5 Merge pull request #53 from matrix-org/anoa/dinsic_release_1_18_x
Merge Synapse release v1.18.0 into 'dinsic'
2020-08-18 09:27:39 +01:00
Andrew Morgan
24652fbdf1 Changelog 2020-08-03 18:44:01 -07:00
Andrew Morgan
5c4aa9762d Update isort to v3.8.3 2020-08-03 18:31:09 -07:00
Andrew Morgan
2ba03d740d dinsic lint
linting after the v1.18.0 mainline merge
2020-08-03 17:57:15 -07:00
Andrew Morgan
4908c95464 Merge commit '320ef9885' into anoa/dinsic_release_1_18_x
* commit '320ef9885':
  Fix formatting of changelog and upgrade notes
  Add deprecation warnings
2020-08-03 17:52:14 -07:00
Andrew Morgan
0b2c404e1a Merge commit 'a9631b7b4' into anoa/dinsic_release_1_18_x
* commit 'a9631b7b4':
  1.18.0
  Update worker docs with recent enhancements  (#7969)
2020-08-03 17:52:10 -07:00
Andrew Morgan
b7c5713ce0 Merge commit '7000a215e' into anoa/dinsic_release_1_18_x
* commit '7000a215e':
  1.18.0rc2
  Typing worker needs to handle stream update requests (#7967)
  Handle replication commands synchronously where possible (#7876)
  update changelog
2020-08-03 17:52:05 -07:00
Andrew Morgan
7f2e76bef9 Merge commit 'f88c48f3b' into anoa/dinsic_release_1_18_x
* commit 'f88c48f3b':
  1.18.0rc1
  Fix error reporting when using `opentracing.trace` (#7961)
  Fix typing replication not being handled on master (#7959)
  Remove hacky error handling for inlineDeferreds. (#7950)
  Convert tests/rest/admin/test_room.py to unix file endings (#7953)
  Support oEmbed for media previews. (#7920)
  Convert state resolution to async/await (#7942)
  Fix up types and comments that refer to Deferreds. (#7945)
  Do not convert async functions to Deferreds in the interactive_auth_handler (#7944)
  Convert more of the media code to async/await (#7873)
  Return an empty body for OPTIONS requests. (#7886)
  Downgrade warning on client disconnect to INFO (#7928)
  Convert presence handler helpers to async/await. (#7939)
  Update the auth providers to be async. (#7935)
  Put a cache on `/state_ids` (#7931)
2020-08-03 17:51:46 -07:00
Andrew Morgan
c7fb21fe44 Merge commit '4876af06d' into anoa/dinsic_release_1_18_x
* commit '4876af06d':
  Abort federation requests if the client disconnects early (#7930)
2020-08-03 17:39:44 -07:00
Andrew Morgan
a684f57379 Merge commit 'ff22672fd' into anoa/dinsic_release_1_18_x
* commit 'ff22672fd':
  Reorder database docs to promote postgresql. (#7933)
2020-08-03 17:39:39 -07:00
Andrew Morgan
9413e26c18 Merge commit '68cd93582' into anoa/dinsic_release_1_18_x
* commit '68cd93582':
  Convert the federation agent and related code to async/await. (#7874)
2020-08-03 17:39:35 -07:00
Andrew Morgan
e6f84dbf1c Merge commit '13d77464c' into anoa/dinsic_release_1_18_x
* commit '13d77464c':
  Follow-up to admin API to re-activate accounts (#7908)
2020-08-03 17:39:31 -07:00
Andrew Morgan
3b44a55096 Merge commit 'cc9bb3dc3' into anoa/dinsic_release_1_18_x
* commit 'cc9bb3dc3':
  Convert the message handler to async/await. (#7884)
2020-08-03 17:39:27 -07:00
Andrew Morgan
b79c36208f Merge commit 'a4cf94a3c' into anoa/dinsic_release_1_18_x
* commit 'a4cf94a3c':
  Update the dates for ACME v1 EOL
2020-08-03 17:39:21 -07:00
Andrew Morgan
38c605a2d3 Merge commit '923c99502' into anoa/dinsic_release_1_18_x
* commit '923c99502':
  Skip serializing /sync response if client has disconnected (#7927)
2020-08-03 17:39:15 -07:00
Andrew Morgan
a1893371e7 Merge commit 'b74919c72' into anoa/dinsic_release_1_18_x
* commit 'b74919c72':
  Add debugging to sync response generation (#7929)
2020-08-03 17:39:10 -07:00
Andrew Morgan
e10d550d56 Merge commit '931b02684' into anoa/dinsic_release_1_18_x
* commit '931b02684':
  Remove an unused prometheus metric (#7878)
2020-08-03 17:39:03 -07:00
Andrew Morgan
195940088e Merge commit '05060e022' into anoa/dinsic_release_1_18_x
* commit '05060e022':
  Track command processing as a background process (#7879)
2020-08-03 17:38:57 -07:00
Andrew Morgan
71b6f38f03 Merge commit '15997618e' into anoa/dinsic_release_1_18_x
* commit '15997618e':
  Clean up PreserveLoggingContext (#7877)
  fix an incorrect comment
2020-08-03 17:38:53 -07:00
Andrew Morgan
a567e763ea Merge commit 'de119063f' into anoa/dinsic_release_1_18_x
* commit 'de119063f': (31 commits)
  Convert room list handler to async/await. (#7912)
  Element CSS and logo in email templates (#7919)
  Lint the contrib/ directory in CI and linting scripts, add synctl to linting script (#7914)
  Remove unused code from synapse.logging.utils. (#7897)
  Fix a typo in the sample config. (#7890)
  Fix deprecation warning: import ABC from collections.abc (#7892)
  Change sample config's postgres user to synapse_user (#7889)
  Fix deprecation warning due to invalid escape sequences (#7895)
  Remove Ubuntu Eoan that is now EOL (#7888)
  Fix the trace function for async functions. (#7872)
  Add help for creating a user via docker (#7885)
  Switch to Debian:Slim from Alpine for the docker image (#7839)
  Stop using 'device_max_stream_id' (#7882)
  Fix TypeError in synapse.notifier (#7880)
  Add a default limit (of 100) to get/sync operations. (#7858)
  Change "unknown room ver" logging to warning. (#7881)
  Convert device handler to async/await (#7871)
  Convert synapse.app to async/await. (#7868)
  Convert _base, profile, and _receipts handlers to async/await (#7860)
  Add admin endpoint to get members in a room. (#7842)
  ...
2020-08-03 17:38:45 -07:00
Andrew Morgan
d9e25be896 Merge commit 'a973bcb8a' into anoa/dinsic_release_1_18_x
* commit 'a973bcb8a':
  Add some tiny type annotations (#7870)
  Remove obsolete comment.
  Ensure that calls to `json.dumps` are compatible with the standard library json. (#7836)
  Avoid brand new rooms in `delete_old_current_state_events` (#7854)
  Allow accounts to be re-activated from the admin APIs. (#7847)
  Fix tests
  Fix typo
  Newsfile
  Use get_users_in_room rather than state handler in typing for speed
  Fix client reader sharding tests (#7853)
  Convert E2E key and room key handlers to async/await. (#7851)
  Return the proper 403 Forbidden error during errors with JWT logins. (#7844)
  remove `retry_on_integrity_error` wrapper for persist_events (#7848)
2020-08-03 17:31:36 -07:00
Andrew Morgan
dd659047f5 Merge commit '8d0097bef' into anoa/dinsic_release_1_18_x
* commit '8d0097bef':
  Fix bug in per-room message retention policies. (#7850)
2020-08-03 17:31:29 -07:00
Andrew Morgan
fd40a70ba8 Merge commit '85223106f' into anoa/dinsic_release_1_18_x
* commit '85223106f':
  Allow email subjects to be customised through Synapse's configuration (#7846)
2020-08-03 17:31:24 -07:00
Andrew Morgan
16a44cff1d Merge commit '491f0dab1' into anoa/dinsic_release_1_18_x
* commit '491f0dab1':
  Add delete room admin endpoint (#7613)
2020-08-03 17:31:18 -07:00
Andrew Morgan
61ac6e22b9 Merge commit '77d2c0541' into anoa/dinsic_release_1_18_x
* commit '77d2c0541':
  Add the option to validate the `iss` and `aud` claims for JWT logins. (#7827)
2020-08-03 17:31:14 -07:00
Andrew Morgan
d249d35414 Merge commit '4db150951' into anoa/dinsic_release_1_18_x
* commit '4db150951':
  Improve the type hints of synapse.api.errors. (#7820)
2020-08-03 17:31:10 -07:00
Andrew Morgan
1a902255b4 Merge commit '93c8b077e' into anoa/dinsic_release_1_18_x
* commit '93c8b077e':
  Clearly state built-in ACME no longer works (#7824)
2020-08-03 17:31:02 -07:00
Andrew Morgan
aed7f97a5c Merge commit 'f886a6991' into anoa/dinsic_release_1_18_x
* commit 'f886a6991':
  Correctly pass app_name to all email templates. (#7829)
2020-08-03 17:30:58 -07:00
Andrew Morgan
2bdf70f95c Merge commit '457096e6d' into anoa/dinsic_release_1_18_x
* commit '457096e6d':
  Support handling registration requests across multiple client readers. (#7830)
2020-08-03 17:30:54 -07:00
Andrew Morgan
e57ee9d0d2 Merge commit '504c8f348' into anoa/dinsic_release_1_18_x
* commit '504c8f348':
  Fix handling of "off" in encryption_enabled_by_default_for_room_type (#7822)
  Update grafana dashboard
2020-08-03 17:30:49 -07:00
Andrew Morgan
196fdb6154 Merge commit '59e64b6d5' into anoa/dinsic_release_1_18_x
* commit '59e64b6d5':
2020-08-03 17:30:43 -07:00
Andrew Morgan
7828cd3276 Merge commit '29df3d0e9' into anoa/dinsic_release_1_18_x
* commit '29df3d0e9':
  1.17.0
2020-08-03 17:29:42 -07:00
Andrew Morgan
17cbac54f4 Merge commit '66a4af8d9' into anoa/dinsic_release_1_18_x
* commit '66a4af8d9':
  Do not use canonicaljson to magically handle decoding bytes from JSON. (#7802)
2020-08-03 17:29:38 -07:00
Andrew Morgan
4d88e6d84b Merge commit 'd9e47af61' into anoa/dinsic_release_1_18_x
* commit 'd9e47af61':
  Add types to the server code and remove unused parameter (#7813)
2020-08-03 17:29:34 -07:00
Andrew Morgan
cf30af504d Merge commit '1bca21e1d' into anoa/dinsic_release_1_18_x
* commit '1bca21e1d':
  Include room states on invite events sent to ASes (#6455)
2020-08-03 17:29:28 -07:00
Andrew Morgan
ab98006170 Merge commit '6cef918a4' into anoa/dinsic_release_1_18_x
* commit '6cef918a4':
2020-08-03 17:29:16 -07:00
Andrew Morgan
cc8720e4af Merge commit '8ccb7f08d' into anoa/dinsic_release_1_18_x
* commit '8ccb7f08d':
  update changelog
2020-08-03 17:29:09 -07:00
Andrew Morgan
bf6cf4b651 Merge commit 'f299441cc' into anoa/dinsic_release_1_18_x
* commit 'f299441cc':
  Add ability to shard the federation sender (#7798)
2020-08-03 17:28:09 -07:00