Compare commits
80 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8a59ebb69 | ||
|
|
e41486e1b4 | ||
|
|
7fee626dbb | ||
|
|
de3ae78346 | ||
|
|
9cb28d29dc | ||
|
|
4fc1c3cef0 | ||
|
|
0d55a94c8d | ||
|
|
0868614791 | ||
|
|
8041a9fcef | ||
|
|
4ef20a8f08 | ||
|
|
d898f229c8 | ||
|
|
75efef6cbb | ||
|
|
3ca3794cc1 | ||
|
|
58fe826905 | ||
|
|
2d8b58a66b | ||
|
|
80ea999dcf | ||
|
|
d57e637ac7 | ||
|
|
4becdfaf1a | ||
|
|
2ed3fd8eb1 | ||
|
|
8a7e098f4f | ||
|
|
5a73f8790c | ||
|
|
1c8bd95bf8 | ||
|
|
da68486f69 | ||
|
|
e338d70303 | ||
|
|
0e793468aa | ||
|
|
1ed71044fd | ||
|
|
61f6bf7e11 | ||
|
|
08ce8185b7 | ||
|
|
7f405a1e6b | ||
|
|
630b30e9cd | ||
|
|
7ceec54658 | ||
|
|
9ff85f5103 | ||
|
|
3402ad2131 | ||
|
|
5410b2b017 | ||
|
|
c9814e25db | ||
|
|
89eb13fa70 | ||
|
|
e8316ee377 | ||
|
|
6603220ece | ||
|
|
9b790d39b7 | ||
|
|
6fbd0e437c | ||
|
|
f03c4e5243 | ||
|
|
3969cc4fe5 | ||
|
|
d4356d2e75 | ||
|
|
3f416461fb | ||
|
|
f951536f97 | ||
|
|
213dcc79bf | ||
|
|
43631d9042 | ||
|
|
7889bd5bba | ||
|
|
a29ec53ef8 | ||
|
|
ff7dc454d1 | ||
|
|
9e0b281b9f | ||
|
|
44dbaf4e5f | ||
|
|
d124978826 | ||
|
|
d2366dca87 | ||
|
|
18c22f35ea | ||
|
|
98c21db158 | ||
|
|
3649849e1c | ||
|
|
f450beb46f | ||
|
|
b4c4b76e52 | ||
|
|
8cb161e997 | ||
|
|
5fdccc8df9 | ||
|
|
9e387f7915 | ||
|
|
a3584e777e | ||
|
|
d1867c7ba6 | ||
|
|
4b6d902230 | ||
|
|
2774e37e72 | ||
|
|
f3f7bec506 | ||
|
|
9735318be9 | ||
|
|
b06afd8e63 | ||
|
|
6403278d37 | ||
|
|
3e2d60a34c | ||
|
|
b02f6409cb | ||
|
|
29e23bd85e | ||
|
|
eed12bfe0b | ||
|
|
1a30c1864d | ||
|
|
cf8933b222 | ||
|
|
9d1d46c30f | ||
|
|
8ca2a5c12a | ||
|
|
2ea3d1b3c8 | ||
|
|
4a48d7978b |
248
CHANGELOG.md
248
CHANGELOG.md
@@ -868,7 +868,7 @@
|
||||
[1.63.0]
|
||||
* Update Synapse to 1.80.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.80.0)
|
||||
* Fix a bug in which the POST /_matrix/client/v3/rooms/{roomId}/report/{eventId} endpoint would return the wrong error if the user did not have permission to view the event. This aligns Synapse's implementation with MSC2249. (#15298, #15300)
|
||||
* Fix a bug in which the POST `/_matrix/client/v3/rooms/{roomId}/report/{eventId}` endpoint would return the wrong error if the user did not have permission to view the event. This aligns Synapse's implementation with MSC2249. (#15298, #15300)
|
||||
* Fix a bug introduced in Synapse 1.75.0rc1 where the SQLite port_db script
|
||||
* would fail to open the SQLite database. (#15301)
|
||||
* Stabilise support for MSC3966: event_property_contains push condition. (#15187)
|
||||
@@ -895,7 +895,7 @@
|
||||
* Fix a bug introduced in Synapse v1.55.0 which could delay remote homeservers being able to decrypt encrypted messages sent by local users. (#15297)
|
||||
* Add a check to SQLite port_db script
|
||||
* to ensure that the sqlite database passed to the script exists before trying to port from it. (#15306)
|
||||
* Fix a bug introduced in Synapse 1.76.0 where responses from worker deployments could include an internal _INT_STREAM_POS key. (#15309)
|
||||
* Fix a bug introduced in Synapse 1.76.0 where responses from worker deployments could include an internal `_INT_STREAM_POS` key. (#15309)
|
||||
* Fix a long-standing bug that Synpase only used the legacy appservice routes. (#15317)
|
||||
* Fix a long-standing bug preventing users from rejoining rooms after being banned and unbanned over federation. Contributed by Nico. (#15323)
|
||||
* Fix bug in worker mode where on a rolling restart of workers the "typing" worker would consume 100% CPU until it got restarted. (#15332)
|
||||
@@ -945,3 +945,247 @@
|
||||
* Fix a long-standing bug where an invalid membership event could cause an internal server error. ([\#15564](https://github.com/matrix-org/synapse/issues/15564))
|
||||
* Require at least poetry-core v1.1.0. ([\#15566](https://github.com/matrix-org/synapse/issues/15566), [\#15571](https://github.com/matrix-org/synapse/issues/15571))
|
||||
|
||||
[1.67.1]
|
||||
* Update Synapse to 1.84.1
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.84.1)
|
||||
* Fix a bug introduced in Synapse v1.84.0 where workers do not start up when no `instance_map` was provided
|
||||
|
||||
[1.68.0]
|
||||
* Update Synapse to 1.85.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.85.0)
|
||||
* GHSA-26c5-ppr8-f33p / CVE-2023-32682 — Low Severity
|
||||
* GHSA-98px-6486-j7qc / CVE-2023-32683 — Low Severity
|
||||
* Fix a performance issue introduced in Synapse v1.83.0 which meant that purging rooms was very slow and database-intensive. (#15693)
|
||||
* Improve performance of backfill requests by performing backfill of previously failed requests in the background. (#15585)
|
||||
* Add a new admin API to create a new device for a user. (#15611)
|
||||
|
||||
[1.68.1]
|
||||
* Update Synapse to 1.85.1
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.85.1)
|
||||
* Fix bug in schema delta that broke upgrades for some deployments. Introduced in v1.85.0. (#15738, #15739)
|
||||
|
||||
[1.68.2]
|
||||
* Update Synapse to 1.85.2
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.85.2)
|
||||
* Fix regression where using TLS for HTTP replication between workers did not work. Introduced in v1.85.0. (#15746)
|
||||
|
||||
[1.69.0]
|
||||
* Update Synapse to 1.86.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.86.0)
|
||||
* Fix an error when having workers of different versions running. (#15774)
|
||||
* Stable support for MSC3882 to allow an existing device/session to generate a login token for use on a new device/session. (#15388)
|
||||
* Support resolving a room's canonical alias via the module API. (#15450)
|
||||
* Enable support for MSC3952: intentional mentions. (#15520)
|
||||
* Experimental MSC3861 support: delegate auth to an OIDC provider. (#15582)
|
||||
* Add Synapse version deploy annotations to Grafana dashboard which enables easy correlation between behavior changes witnessed in a graph to a certain Synapse version and nail down regressions. (#15674)
|
||||
* Add a catch-all * to the supported relation types when redacting an event and its related events. This is an update to MSC3912 implementation. (#15705)
|
||||
* Speed up /messages by backfilling in the background when there are no backward extremities where we are directly paginating. (#15710)
|
||||
* Expose a metric reporting the database background update status. (#15740)
|
||||
* Correctly clear caches when we delete a room. (#15609)
|
||||
* Check permissions for enabling encryption earlier during room creation to avoid creating broken rooms. (#15695)
|
||||
|
||||
[1.70.0]
|
||||
* Update Synapse to 1.87.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.87.0)
|
||||
* Improve /messages response time by avoiding backfill when we already have messages to return. (#15737)
|
||||
* Add spam checker module API for logins. (#15838)
|
||||
* Fix a long-standing bug where media files were served in an unsafe manner. Contributed by @joshqou. (#15680)
|
||||
* Avoid invalidating a cache that was just prefilled. (#15758)
|
||||
* Fix requesting multiple keys at once over federation, related to MSC3983. (#15770)
|
||||
* Fix joining rooms through aliases where the alias server isn't a real homeserver. Contributed by @tulir @ Beeper. (#15776)
|
||||
|
||||
[1.70.1]
|
||||
* Add workaround for broken thumbnailing
|
||||
* Update s3 storage provider
|
||||
|
||||
[1.71.0]
|
||||
* Update Synapse to 1.88.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.88.0)
|
||||
* Add not_user_type param to the list accounts admin API. (#15844)
|
||||
* Pin pydantic to ^=1.7.4 to avoid backwards-incompatible API changes from the 2.0.0 release.
|
||||
* Contributed by @PaarthShah. (#15862)
|
||||
* Correctly resize thumbnails with pillow version >=10. (#15876)
|
||||
|
||||
[1.72.0]
|
||||
* Update Synapse to 1.89.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.89.0)
|
||||
* Add Unix Socket support for HTTP Replication Listeners. Document and provide usage instructions for utilizing Unix sockets in Synapse. Contributed by Jason Little. (#15708, #15924)
|
||||
* Allow + in Matrix IDs, per MSC4009. (#15911)
|
||||
* Support room version 11 from MSC3820. (#15912)
|
||||
* Allow configuring the set of workers to proxy outbound federation traffic through via outbound_federation_restricted_to. (#15913, #15969)
|
||||
* Implement MSC3814, dehydrated devices v2/shrivelled sessions and move MSC2697 behind a config flag. Contributed by Nico from Famedly, H-Shay and poljar. (#15929)
|
||||
* Fix a long-standing bug where remote invites weren't correctly pushed. (#15820)
|
||||
* Fix background schema updates failing over a large upgrade gap. (#15887)
|
||||
* Fix a bug introduced in 1.86.0 where Synapse starting with an empty experimental_features configuration setting. (#15925)
|
||||
* Fixed deploy annotations in the provided Grafana dashboard config, so that it shows for any homeserver and not just matrix.org. Contributed by @wrjlewis. (#15957)
|
||||
* Ensure a long state res does not starve CPU by occasionally yielding to the reactor. (#15960)
|
||||
* Properly handle redactions of creation events. (#15973)
|
||||
* Fix a bug where resyncing stale device lists could block responding to federation transactions, and thus delay receiving new data from the remote server. (#15975)
|
||||
|
||||
[1.73.0]
|
||||
* Update Synapse to 1.90.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.90.0)
|
||||
* Scope transaction IDs to devices (implement MSC3970). (#15629)
|
||||
* Remove old rows from the cache_invalidation_stream_by_instance table automatically (this table is unused in SQLite). (#15868)
|
||||
* Fix a long-standing bug where purging history and paginating simultaneously could lead to database corruption when using workers. (#15791)
|
||||
* Fix a long-standing bug where profile endpoint returned a 404 when the user's display name was empty. (#16012)
|
||||
* Fix a long-standing bug where the synapse_port_db failed to configure sequences for application services and partial stated rooms. (#16043)
|
||||
* Fix long-standing bug with deletion in dehydrated devices v2. (#16046)
|
||||
|
||||
[1.74.0]
|
||||
* Turn addon can be optionally enabled/disabled
|
||||
|
||||
[1.75.0]
|
||||
* Update Synapse to 1.91.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.91.0)
|
||||
|
||||
[1.75.1]
|
||||
* Update Synapse to 1.91.1
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.91.1)
|
||||
* Fix a performance regression introduced in Synapse 1.91.0 where event persistence would cause an excessive linear growth in CPU usage. (#16220)
|
||||
|
||||
[1.75.2]
|
||||
* Update Synapse to 1.91.2
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.91.2)
|
||||
* Revert MSC3861 introspection cache, admin impersonation and account lock. (#16258)
|
||||
|
||||
[1.76.0]
|
||||
* Update Synapse to 1.92.1
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.92.0)
|
||||
* Revert MSC3861 introspection cache, admin impersonation and account lock. (#16258)
|
||||
* Fix incorrect docstring for Ratelimiter. (#16255)
|
||||
|
||||
[1.76.1]
|
||||
* Update Synapse to 1.92.2
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.92.2)
|
||||
|
||||
[1.76.2]
|
||||
* Update Synapse to 1.92.3
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.92.3)
|
||||
* Pillow 10.0.1 is now mandatory because of libwebp CVE-2023-4863, since Pillow provides libwebp in the wheels. (#16347)
|
||||
|
||||
[1.77.0]
|
||||
* Update Synapse to 1.93.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.93.0)
|
||||
* GHSA-4f74-84v3-j9q5 / CVE-2023-41335 — Low Severity Temporary storage of plaintext passwords during password changes.
|
||||
* GHSA-7565-cq32-vx2x / CVE-2023-42453 — Low Severity Improper validation of receipts allows forged read receipts.
|
||||
* Add automatic purge after all users have forgotten a room. (#15488)
|
||||
* Restore room purge/shutdown after a Synapse restart. (#15488)
|
||||
* Support resolving homeservers using matrix-fed DNS SRV records from MSC4040. (#16137)
|
||||
* Add the ability to use G (GiB) and T (TiB) suffixes in configuration options that refer to numbers of bytes. (#16219)
|
||||
* Add span information to requests sent to appservices. Contributed by MTRNord. (#16227)
|
||||
* Add the ability to enable/disable registrations when using CAS. Contributed by Aurélien Grimpard. (#16262)
|
||||
* Allow the /notifications endpoint to be routed to workers. (#16265)
|
||||
|
||||
[1.78.0]
|
||||
* Update base image to 4.2.0
|
||||
|
||||
[1.79.0]
|
||||
* Update Synapse to 1.94.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.94.0)
|
||||
* Render plain, CSS, CSV, JSON and common image formats in the browser (inline) when requested through the /download endpoint. (#15988)
|
||||
* Add experimental support for MSC4028 to push all encrypted events to clients. (#16361)
|
||||
* Minor performance improvement when sending presence to federated servers. (#16385)
|
||||
* Minor performance improvement by caching server ACL checking. (#16360)
|
||||
|
||||
[1.80.0]
|
||||
* Update Synapse to 1.95.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.95.0)
|
||||
* Remove legacy unspecced `knock_state_events` field returned in some responses. (#16403)
|
||||
* Fix a bug introduced in Synapse 1.81.0 where an AttributeError would be raised when `_matrix/client/v3/account/whoami` is called over a unix socket. Contributed by @Sir-Photch. (#16404)
|
||||
* Properly return inline media when content types have parameters. (#16440)
|
||||
* Prevent the purging of large rooms from timing out when Postgres is in use. The timeout which causes this issue was introduced in Synapse 1.88.0. (#16455)
|
||||
* Improve the performance of purging rooms, particularly encrypted rooms. (#16457)
|
||||
* Fix a bug introduced in Synapse 1.59.0 where servers could be incorrectly marked as available after an error response was received. (#16506)
|
||||
|
||||
[1.80.1]
|
||||
* Update Synapse to 1.95.1
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.95.1)
|
||||
* GHSA-mp92-3jfm-3575 / CVE-2023-43796 — Moderate Severity
|
||||
|
||||
[1.81.0]
|
||||
* Update Synapse to 1.96.1
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.96.1)
|
||||
* Add experimental support to allow multiple workers to write to receipts stream. (#16432)
|
||||
* Add a new module API for controller presence. (#16544)
|
||||
* Add a new module API callback that allows adding extra fields to events' unsigned section when sent down to clients. (#16549)
|
||||
* Improve the performance of claiming encryption keys. (#16565, #16570)
|
||||
|
||||
[1.82.0]
|
||||
* Switch LDAP authentication to OIDC login
|
||||
|
||||
[1.83.0]
|
||||
* Update Synapse to 1.97.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.97.0)
|
||||
* Add support for asynchronous uploads as defined by MSC2246. Contributed by @sumnerevans at @beeper. (#15503)
|
||||
* Improve the performance of some operations in multi-worker deployments. (#16613, #16616)
|
||||
* Fix a long-standing bug where some queries updated the same row twice. Introduced in Synapse 1.57.0. (#16609)
|
||||
* Fix a long-standing bug where Synapse would not unbind third-party identifiers for Application Service users when deactivated and would not emit a compliant response. (#16617)
|
||||
* Fix sending out of order POSITION over replication, causing additional database load. (#16639)
|
||||
|
||||
[1.84.0]
|
||||
* Update Synapse to 1.98.0
|
||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.98.0)
|
||||
* Synapse now declares support for Matrix v1.7, v1.8, and v1.9. (#16707)
|
||||
* Add `on_user_login` module API callback for when a user logs in. (#15207)
|
||||
* Support MSC4069: Inhibit profile propagation. (#16636)
|
||||
* Restore tracking of requests and monthly active users when delegating authentication via MSC3861 to an OIDC provider. (#16672)
|
||||
* Add an autojoin setting for server notices rooms, so users may be joined directly instead of receiving an invite. (#16699)
|
||||
* Follow redirects when downloading media over federation (per MSC3860). (#16701)
|
||||
|
||||
[1.85.0]
|
||||
* Update public suffix list as part of the base image to get the latest domains
|
||||
|
||||
[1.86.0]
|
||||
* Update Synapse to 1.99.0
|
||||
* [Full changelog](https://github.com/element-hq/synapse/releases/tag/v1.99.0)
|
||||
* Add config options to set the avatar and the topic of the server notices room, as well as the avatar of the server notices user. (\https://github.com/element-hq/synapse/issues/16679)
|
||||
* Add config option email.notif_delay_before_mail to tweak the delay before an email is sent following a notification. (\https://github.com/element-hq/synapse/issues/16696)
|
||||
* Add new configuration option sentry.environment for improved system monitoring. Contributed by @zeeshanrafiqrana. (\https://github.com/element-hq/synapse/issues/16738)
|
||||
* Filter out rooms from the room directory being served to other homeservers when those rooms block that homeserver by their Access Control Lists. (\https://github.com/element-hq/synapse/pull/16759)
|
||||
* Fix a long-standing bug where the signing keys generated by Synapse were world-readable. Contributed by Fabian Klemp. (\https://github.com/element-hq/synapse/issues/16740)
|
||||
* Fix email verification redirection. Contributed by Fadhlan Ridhwanallah. (\https://github.com/element-hq/synapse/pull/16761)
|
||||
* Fixed a bug that prevented users from being queried by display name if it contains non-ASCII characters. (\https://github.com/element-hq/synapse/pull/16767)
|
||||
* Allow reactivate user without password with Admin API in some edge cases. (\https://github.com/element-hq/synapse/pull/16770)
|
||||
* Adds the recursion_depth parameter to the response of the /relations endpoint if MSC3981 recursion is being performed. (\https://github.com/element-hq/synapse/pull/16775)
|
||||
* Added version picker for Synapse documentation. Contributed by @Dmytro27Ind. (\https://github.com/element-hq/synapse/issues/16533)
|
||||
* Clarify that password_config.enabled: "only_for_reauth" does not allow new logins to be created using password auth. (\https://github.com/element-hq/synapse/issues/16737)
|
||||
* Remove value from header in configuration documentation for refresh_token_lifetime. (\https://github.com/element-hq/synapse/pull/16763)
|
||||
* Add another custom statistics collection server to the documentation. Contributed by @loelkes. (\https://github.com/element-hq/synapse/pull/16769)
|
||||
* Remove run-once workflow after adding the version picker to the documentation. (\https://github.com/element-hq/synapse/pull/9453)
|
||||
* Update the implementation of [MSC2965](matrix-org/matrix-spec-proposals#2965) (OIDC Provider discovery). (\https://github.com/element-hq/synapse/issues/16726)
|
||||
* Move the rust stubs inline for better IDE integration. (\https://github.com/element-hq/synapse/pull/16757)
|
||||
* Fix sample config doc CI. (\https://github.com/element-hq/synapse/pull/16758)
|
||||
* Simplify event internal metadata class. (\https://github.com/element-hq/synapse/pull/16762, \https://github.com/element-hq/synapse/pull/16780)
|
||||
* Sign the published docker image using cosign. (\https://github.com/element-hq/synapse/pull/16774)
|
||||
* Port EventInternalMetadata class to Rust. (\https://github.com/element-hq/synapse/pull/16782)
|
||||
* Bump actions/setup-go from 4 to 5. (\https://github.com/element-hq/synapse/issues/16749)
|
||||
* Bump actions/setup-python from 4 to 5. (\https://github.com/element-hq/synapse/issues/16748)
|
||||
* Bump immutabledict from 3.0.0 to 4.0.0. (\https://github.com/element-hq/synapse/issues/16743)
|
||||
* Bump isort from 5.12.0 to 5.13.0. (\https://github.com/element-hq/synapse/issues/16745)
|
||||
* Bump isort from 5.13.0 to 5.13.1. (\https://github.com/element-hq/synapse/issues/16752)
|
||||
* Bump pydantic from 2.5.1 to 2.5.2. (\https://github.com/element-hq/synapse/issues/16747)
|
||||
* Bump ruff from 0.1.6 to 0.1.7. (\https://github.com/element-hq/synapse/issues/16746)
|
||||
* Bump types-setuptools from 68.2.0.2 to 69.0.0.0. (\https://github.com/element-hq/synapse/issues/16744)
|
||||
|
||||
[1.87.0]
|
||||
* Update Synapse to 1.100.0
|
||||
* [Full changelog](https://github.com/element-hq/synapse/releases/tag/v1.100.0)
|
||||
* Fix database performance regression due to changing Postgres table statistics. Introduced in v1.100.0rc1. (#16849)
|
||||
* Advertise experimental support for MSC4028 through /matrix/clients/versions if enabled. Contributed by @hanadi92. (#16787)
|
||||
* Handle wildcard type filters properly for room messages endpoint. Contributed by Mo Balaa. (#14984)
|
||||
|
||||
[1.88.0]
|
||||
* Update Synapse to 1.101.0
|
||||
* [Full changelog](https://github.com/element-hq/synapse/releases/tag/v1.101.0)
|
||||
* Add support for stabilised MSC3981 that adds a recurse parameter on the /relations API. (#16842)
|
||||
* Fix performance regression when fetching auth chains from the DB. Introduced in v1.100.0. (#16893)
|
||||
|
||||
[1.89.0]
|
||||
* Update Synapse to 1.102.0
|
||||
* [Full changelog](https://github.com/element-hq/synapse/releases/tag/v1.102.0)
|
||||
* A metric was added for emails sent by Synapse, broken down by type: `synapse_emails_sent_total`. Contributed by Remi Rampin. (#16881)
|
||||
* Do not send multiple concurrent requests for keys for the same server. (#16894)
|
||||
* Fix performance issue when joining very large rooms that can cause the server to lock up. Introduced in v1.100.0. (#16903)
|
||||
* Always prefer unthreaded receipt when >1 exist (MSC4102). (#16927)
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"changelog": "file://CHANGELOG.md",
|
||||
"tagline": "Secure & decentralized communication",
|
||||
"version": "1.67.0",
|
||||
"upstreamVersion": "1.84.0",
|
||||
"version": "1.89.0",
|
||||
"upstreamVersion": "1.102.0",
|
||||
"healthCheckPath": "/",
|
||||
"httpPort": 8008,
|
||||
"memoryLimit": 536870912,
|
||||
"addons": {
|
||||
"localstorage": {},
|
||||
"ldap": {},
|
||||
"oidc": { "loginRedirectUri": "/_synapse/client/oidc/callback" },
|
||||
"postgresql": {},
|
||||
"sendmail": { "supportsDisplayName": true },
|
||||
"turn": {}
|
||||
"turn": { "optional": true }
|
||||
},
|
||||
"manifestVersion": 2,
|
||||
"website": "https://matrix.org",
|
||||
@@ -30,7 +30,7 @@
|
||||
"https://screenshots.cloudron.io/org.matrix.synapse/3.png"
|
||||
],
|
||||
"postInstallMessage": "file://POSTINSTALL.md",
|
||||
"minBoxVersion": "7.2.0",
|
||||
"minBoxVersion": "7.5.1",
|
||||
"forumUrl": "https://forum.cloudron.io/category/50/matrix-synapse-riot",
|
||||
"documentationUrl": "https://docs.cloudron.io/apps/synapse/",
|
||||
"optionalSso": true
|
||||
|
||||
11
Dockerfile
11
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df
|
||||
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
|
||||
|
||||
RUN mkdir -p /app/pkg
|
||||
|
||||
@@ -9,16 +9,19 @@ RUN virtualenv -p python3 /app/code/env
|
||||
ENV VIRTUAL_ENV=/app/code/env
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
ARG VERSION=v1.84.0
|
||||
ARG VERSION=1.102.0
|
||||
|
||||
# https://github.com/matrix-org/synapse-s3-storage-provider
|
||||
ARG STORAGE_PROVIDER_VERSION=fa27fa1a92bcbeb42b10399641348bee0ddf2c72
|
||||
ARG STORAGE_PROVIDER_VERSION=1beb6af95e1f5caedb8e6e7e1cc176cdb2106d37
|
||||
|
||||
# Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md)
|
||||
# lxml - required for previews
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install --upgrade setuptools && \
|
||||
pip install matrix-synapse==${VERSION} psycopg2-binary python-ldap matrix-synapse-ldap3 lxml publicsuffix2 git+https://github.com/matrix-org/synapse-s3-storage-provider.git@${STORAGE_PROVIDER_VERSION} matrix-synapse[oidc]
|
||||
pip install matrix-synapse==v${VERSION} psycopg2-binary python-ldap matrix-synapse-ldap3 lxml publicsuffix2 git+https://github.com/matrix-org/synapse-s3-storage-provider.git@${STORAGE_PROVIDER_VERSION} matrix-synapse[oidc]
|
||||
|
||||
# Updated suffix list
|
||||
RUN curl -L https://publicsuffix.org/list/public_suffix_list.dat -o /app/code/env/lib/python3.10/site-packages/publicsuffix2/public_suffix_list.dat
|
||||
|
||||
RUN ln -sf /app/data/index.html /app/code/env/lib/python3.10/site-packages/synapse/static/index.html
|
||||
|
||||
|
||||
40
start.sh
40
start.sh
@@ -35,12 +35,12 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
|
||||
yq eval -i ".auto_join_rooms=[]" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".auto_join_rooms[0]=\"#discuss:${server_name}\"" /app/data/configs/homeserver.yaml
|
||||
|
||||
if [[ -z "${CLOUDRON_LDAP_SERVER:-}" ]]; then
|
||||
if [[ -z "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
||||
yq eval -i ".enable_registration=true" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".password_config.pepper=\"$(pwgen -1s 12)\"" /app/data/configs/homeserver.yaml
|
||||
# just setting enabled to false is not enough. see https://github.com/matrix-org/matrix-synapse-ldap3/issues/123
|
||||
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml
|
||||
fi
|
||||
yq eval -i ".password_config.pepper=\"$(pwgen -1s 12)\"" /app/data/configs/homeserver.yaml # always set this so that users can enable password login if needed
|
||||
fi
|
||||
|
||||
echo "==> Ensure we log to console"
|
||||
@@ -65,15 +65,25 @@ yq eval -i ".email.smtp_user=\"${CLOUDRON_MAIL_SMTP_USERNAME}\"" /app/data/confi
|
||||
yq eval -i ".email.smtp_pass=\"${CLOUDRON_MAIL_SMTP_PASSWORD}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".email.notif_from=\"${CLOUDRON_MAIL_FROM_DISPLAY_NAME:-Matrix} <${CLOUDRON_MAIL_FROM}>\"" /app/data/configs/homeserver.yaml
|
||||
|
||||
# ldap
|
||||
if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then
|
||||
yq eval -i ".password_providers[0].config.uri=\"${CLOUDRON_LDAP_URL}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".password_providers[0].config.start_tls=false" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".password_providers[0].config.base=\"${CLOUDRON_LDAP_USERS_BASE_DN}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".password_providers[0].config.bind_dn=\"${CLOUDRON_LDAP_BIND_DN}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".password_providers[0].config.bind_password=\"${CLOUDRON_LDAP_BIND_PASSWORD}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".password_providers[0].config.filter=\"(objectClass=user)\"" /app/data/configs/homeserver.yaml
|
||||
# oidc
|
||||
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
||||
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml # remove old ldap config
|
||||
echo " ==> Configuring OIDC auth"
|
||||
yq eval -i ".oidc_providers[0].idp_id=\"cloudron\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].idp_name=\"Cloudron\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].issuer=\"${CLOUDRON_OIDC_ISSUER}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].client_id=\"${CLOUDRON_OIDC_CLIENT_ID}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].client_secret=\"${CLOUDRON_OIDC_CLIENT_SECRET}\"" /app/data/configs/homeserver.yaml
|
||||
|
||||
yq eval -i ".oidc_providers[0].scopes=[\"openid\", \"email\", \"profile\"]" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].authorization_endpoint=\"${CLOUDRON_OIDC_AUTH_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].token_endpoint=\"${CLOUDRON_OIDC_TOKEN_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].userinfo_endpoint=\"${CLOUDRON_OIDC_PROFILE_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
||||
# https://s3lph.me/ldap-to-oidc-migration-3-matrix.html
|
||||
yq eval -i ".oidc_providers[0].allow_existing_users=true" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].skip_verification=true" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].user_mapping_provider.config.localpart_template=\"{{ user.sub }}\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".oidc_providers[0].user_mapping_provider.config.display_name_template=\"{{ user.name }}\"" /app/data/configs/homeserver.yaml
|
||||
else
|
||||
yq eval -i ".password_config.localdb_enabled=true" /app/data/configs/homeserver.yaml
|
||||
# just setting enabled to false is not enough. see https://github.com/matrix-org/matrix-synapse-ldap3/issues/123
|
||||
@@ -81,10 +91,12 @@ else
|
||||
fi
|
||||
|
||||
# turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup)
|
||||
yq eval -i ".turn_uris=[]" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".turn_uris[0]=\"turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=udp\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".turn_uris[1]=\"turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=tcp\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".turn_shared_secret=\"${CLOUDRON_TURN_SECRET}\"" /app/data/configs/homeserver.yaml
|
||||
if [[ -n "${CLOUDRON_TURN_SERVER:-}" ]]; then
|
||||
yq eval -i ".turn_uris=[]" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".turn_uris[0]=\"turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=udp\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".turn_uris[1]=\"turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=tcp\"" /app/data/configs/homeserver.yaml
|
||||
yq eval -i ".turn_shared_secret=\"${CLOUDRON_TURN_SECRET}\"" /app/data/configs/homeserver.yaml
|
||||
fi
|
||||
|
||||
# fix permissions
|
||||
echo "==> Fixing permissions"
|
||||
|
||||
1063
test/package-lock.json
generated
1063
test/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,10 +9,9 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"chromedriver": "^113.0.0",
|
||||
"chromedriver": "^122.0.4",
|
||||
"expect.js": "^0.3.1",
|
||||
"mocha": "^10.2.0",
|
||||
"selenium-webdriver": "^4.9.1",
|
||||
"superagent": "^8.0.9"
|
||||
"mocha": "^10.3.0",
|
||||
"selenium-webdriver": "^4.18.1"
|
||||
}
|
||||
}
|
||||
|
||||
392
test/test.js
392
test/test.js
@@ -1,214 +1,360 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/* jshint esversion: 8 */
|
||||
/* global describe */
|
||||
/* global before */
|
||||
/* global after */
|
||||
/* global it */
|
||||
/* global xit */
|
||||
/* global it:false */
|
||||
/* global xit:false */
|
||||
/* global describe:false */
|
||||
/* global before:false */
|
||||
/* global after:false */
|
||||
|
||||
'use strict';
|
||||
|
||||
require('chromedriver');
|
||||
|
||||
var execSync = require('child_process').execSync,
|
||||
const execSync = require('child_process').execSync,
|
||||
expect = require('expect.js'),
|
||||
path = require('path'),
|
||||
superagent = require('superagent'),
|
||||
{ Builder, By, Key, until } = require('selenium-webdriver'),
|
||||
{ Options } = require('selenium-webdriver/chrome');
|
||||
|
||||
|
||||
if (!process.env.USERNAME || !process.env.PASSWORD) {
|
||||
console.log('USERNAME and PASSWORD env vars need to be set');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
describe('Application life cycle test', function () {
|
||||
this.timeout(0);
|
||||
|
||||
const ELEMENT_LOCATION = 'element-test';
|
||||
const LOCATION = 'test';
|
||||
const TEST_TIMEOUT = 10000;
|
||||
const TEST_TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 10000;
|
||||
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||
const USERNAME = process.env.USERNAME;
|
||||
const PASSWORD = process.env.PASSWORD;
|
||||
const ROOM_ID = Math.floor((Math.random() * 100) + 1);
|
||||
const ROOM_NAME = 'Test room ' + ROOM_ID;
|
||||
const MSG_TEXT = 'Test message ';
|
||||
|
||||
const username = process.env.USERNAME;
|
||||
const password = process.env.PASSWORD;
|
||||
|
||||
var app, browser;
|
||||
var token, roomId;
|
||||
let browser, app;
|
||||
let athenticated_by_oidc = false;
|
||||
|
||||
before(function () {
|
||||
if (!process.env.USERNAME) throw new Error('USERNAME env var not set');
|
||||
if (!process.env.PASSWORD) throw new Error('PASSWORD env var not set');
|
||||
const options = new Options().windowSize({ width: 1280, height: 1024 });
|
||||
if (process.env.HEADLESS) options.addArguments('headless');
|
||||
|
||||
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
|
||||
browser = new Builder().forBrowser('chrome').setChromeOptions(options).build();
|
||||
});
|
||||
|
||||
after(function () {
|
||||
browser.quit();
|
||||
});
|
||||
|
||||
function sleep(millis) {
|
||||
return new Promise(resolve => setTimeout(resolve, millis));
|
||||
}
|
||||
|
||||
async function waitForElement(elem) {
|
||||
await browser.wait(until.elementLocated(elem), TEST_TIMEOUT);
|
||||
await browser.wait(until.elementIsVisible(browser.findElement(elem)), TEST_TIMEOUT);
|
||||
}
|
||||
|
||||
function getAppInfo() {
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
const inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
||||
expect(app).to.be.an('object');
|
||||
}
|
||||
|
||||
function getElementAppInfo() {
|
||||
const inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location.indexOf(ELEMENT_LOCATION) === 0; })[0];
|
||||
expect(app).to.be.an('object');
|
||||
}
|
||||
|
||||
function getMessage() {
|
||||
return MSG_TEXT + Math.floor((Math.random() * 100) + 1);
|
||||
}
|
||||
|
||||
async function updateSynapseConfig() {
|
||||
console.log(`Setting Synapse Matrix server location to "https://${app.fqdn}"`);
|
||||
execSync(`cloudron exec --app ${ELEMENT_LOCATION} -- bash -c "jq '.default_server_config[\\"m.homeserver\\"].base_url = \\"https://${app.fqdn}\\"' /app/data/config.json | sponge /app/data/config.json"`);
|
||||
execSync(`cloudron restart --app ${ELEMENT_LOCATION}`);
|
||||
// wait when all services are up and running
|
||||
await sleep(15000);
|
||||
}
|
||||
|
||||
async function checkLandingPage() {
|
||||
await browser.get(`https://${app.fqdn}`);
|
||||
await browser.wait(until.elementLocated(By.xpath('//h1[contains(text(),"Synapse is running")]')), TEST_TIMEOUT);
|
||||
}
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#user-interactive-api-in-the-rest-api
|
||||
function registerUser(done) {
|
||||
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/register?kind=user').send({
|
||||
username: username,
|
||||
password: password,
|
||||
inhibit_login: false
|
||||
}).end(function (error, result) {
|
||||
// we will first get a 401
|
||||
let session = result.body.session;
|
||||
console.log('session is', session);
|
||||
if (result.statusCode !== 401) return done(new Error('Expecting a 401 ' + result.statusCode));
|
||||
|
||||
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/register?kind=user').send({
|
||||
auth: {
|
||||
type: 'm.login.dummy',
|
||||
session: session
|
||||
},
|
||||
username: username,
|
||||
password: password,
|
||||
inhibit_login: false
|
||||
}).end(function (error, result) {
|
||||
if (error) return done(error);
|
||||
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
|
||||
|
||||
console.log('registered user with id', result.body.user_id);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
async function registerUser() {
|
||||
await browser.get(`https://${app.fqdn}/#/register`);
|
||||
await waitForElement(By.xpath('//input[@label="Username"]'));
|
||||
await browser.findElement(By.xpath('//input[@label="Username"]')).sendKeys(USERNAME);
|
||||
await browser.sleep(2000);
|
||||
await browser.findElement(By.xpath('//input[@label="Password"]')).sendKeys(PASSWORD);
|
||||
await browser.sleep(2000);
|
||||
await browser.findElement(By.xpath('//input[@label="Confirm password"]')).sendKeys(PASSWORD);
|
||||
await browser.sleep(2000);
|
||||
await browser.findElement(By.xpath('//input[@value="Register"]')).click();
|
||||
await browser.sleep(2000);
|
||||
await waitForElement(By.xpath('//h1[text()="You\'re in"]'));
|
||||
await browser.sleep(2000);
|
||||
await browser.findElement(By.xpath('//div[@role="button" and text()="Skip"]')).click();
|
||||
await browser.sleep(2000);
|
||||
await waitForElement(By.xpath(`//h1[contains(., "Welcome")]`));
|
||||
}
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest
|
||||
function checkLogin(done) {
|
||||
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/login').send({
|
||||
type: 'm.login.password',
|
||||
user: username,
|
||||
password: password
|
||||
}).end(function (error, result) {
|
||||
if (error) return done(error);
|
||||
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
|
||||
async function loginOIDC(username, password) {
|
||||
browser.manage().deleteAllCookies();
|
||||
await browser.get(`https://${app.fqdn}/#/login`);
|
||||
await browser.sleep(6000);
|
||||
|
||||
token = result.body.access_token;
|
||||
if (!token) return done(new Error('No token'));
|
||||
await waitForElement(By.xpath('//div[@role="button" and contains(., "Continue with Cloudron")]'));
|
||||
await browser.findElement(By.xpath('//div[@role="button" and contains(., "Continue with Cloudron")]')).click();
|
||||
await browser.sleep(2000);
|
||||
|
||||
done();
|
||||
});
|
||||
if (!athenticated_by_oidc) {
|
||||
await waitForElement(By.xpath('//input[@name="username"]'));
|
||||
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
|
||||
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
|
||||
await browser.sleep(2000);
|
||||
await browser.findElement(By.id('loginSubmitButton')).click();
|
||||
await browser.sleep(2000);
|
||||
|
||||
athenticated_by_oidc = true;
|
||||
}
|
||||
|
||||
await waitForElement(By.xpath('//p[@class="confirm-trust" and contains(., "Continuing will grant ")]'));
|
||||
await browser.findElement(By.xpath('//a[contains(., "Continue")]')).click();
|
||||
await browser.sleep(2000);
|
||||
|
||||
if (await browser.findElements(By.xpath('//div[@aria-label="Skip verification for now"]')).then(found => !!found.length)) {
|
||||
await skipVerification();
|
||||
}
|
||||
|
||||
await browser.sleep(3000);
|
||||
await waitForElement(By.xpath(`//h1[contains(., "Welcome")]`));
|
||||
}
|
||||
|
||||
function checkAutoJoinRoom(done) {
|
||||
superagent.get('https://' + app.fqdn + '/_matrix/client/r0/joined_rooms?access_token=' + token).end(function (error, result) {
|
||||
if (error) return done(error);
|
||||
if (result.statusCode !== 200) return done(new Error('Room listing failed with status ' + result.statusCode));
|
||||
async function login() {
|
||||
await browser.get('https://' + app.fqdn + '/#/login');
|
||||
await browser.wait(until.elementLocated(By.xpath('//input[@value="Sign in"]')), TEST_TIMEOUT);
|
||||
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(USERNAME);
|
||||
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(PASSWORD);
|
||||
await browser.findElement(By.xpath('//input[@value="Sign in"]')).click();
|
||||
await browser.sleep(5000);
|
||||
|
||||
if (result.body.joined_rooms.length !== 1) return done(new Error('User must have auto-joined discuss channel:' + result.statusCode));
|
||||
done();
|
||||
});
|
||||
if (await browser.findElements(By.xpath('//div[@aria-label="Skip verification for now"]')).then(found => !!found.length)) {
|
||||
await skipVerification();
|
||||
}
|
||||
|
||||
await browser.wait(until.elementLocated(By.xpath('//span[text()="Rooms"]')), TEST_TIMEOUT);
|
||||
}
|
||||
|
||||
function createRoom(done) {
|
||||
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/createRoom?access_token=' + token).send({
|
||||
room_alias_name: 'general'
|
||||
}).end(function (error, result) {
|
||||
if (error) return done(error);
|
||||
if (result.statusCode !== 200) return done(new Error('Room creation failed with status ' + result.statusCode));
|
||||
|
||||
roomId = result.body.room_id;
|
||||
if (!roomId) return done(new Error('No room id'));
|
||||
|
||||
done();
|
||||
});
|
||||
async function skipVerification() {
|
||||
await browser.wait(until.elementLocated(By.xpath('//div[@aria-label="Skip verification for now"]')), TEST_TIMEOUT);
|
||||
await browser.sleep(5000);
|
||||
await browser.findElement(By.xpath('//div[@aria-label="Skip verification for now"]')).click();
|
||||
await browser.wait(until.elementLocated(By.xpath('//div[contains(text(), "verify later")]')), TEST_TIMEOUT);
|
||||
await browser.sleep(5000);
|
||||
await browser.findElement(By.xpath('//div[contains(text(), "verify later")]')).click();
|
||||
await browser.sleep(5000);
|
||||
}
|
||||
|
||||
function checkRoom(done) {
|
||||
superagent.get('https://' + app.fqdn + '/_matrix/client/r0/joined_rooms?access_token=' + token).end(function (error, result) {
|
||||
if (error) return done(error);
|
||||
if (result.statusCode !== 200) return done(new Error('Room listing failed with status ' + result.statusCode));
|
||||
async function logout() {
|
||||
await browser.get('https://' + app.fqdn + '/#/home');
|
||||
await browser.sleep(5000);
|
||||
await waitForElement(By.xpath('//div[@role="button" and @title="User menu"]'));
|
||||
|
||||
if (!result.body.joined_rooms.includes(roomId)) return done(new Error('No room in list: ' + JSON.stringify(result.body)));
|
||||
await browser.findElement(By.xpath('//div[@role="button" and @title="User menu"]')).click();
|
||||
await browser.sleep(2000);
|
||||
|
||||
done();
|
||||
});
|
||||
await browser.findElement(By.xpath('//li[@role="menuitem" and @aria-label="Sign out"]')).click();
|
||||
await browser.sleep(2000);
|
||||
|
||||
if (await browser.findElements(By.xpath('//button[contains(text(), "I don\'t want my encrypted messages")]')).then(found => !!found.length)) {
|
||||
await browser.findElement(By.xpath('//button[contains(text(), "I don\'t want my encrypted messages")]')).click();
|
||||
await browser.sleep(3000);
|
||||
}
|
||||
|
||||
await waitForElement(By.xpath('//h1[text()="Sign in"]'));
|
||||
}
|
||||
|
||||
async function isLoggedIn() {
|
||||
await browser.get('https://' + app.fqdn + '/#/home');
|
||||
await browser.wait(until.elementLocated(By.xpath('//span[text()="Rooms"]')), TEST_TIMEOUT);
|
||||
}
|
||||
|
||||
async function createRoom() {
|
||||
await browser.get('https://' + app.fqdn + '/#/home');
|
||||
await browser.sleep(4000);
|
||||
await waitForElement(By.xpath('//div[@role="button" and @aria-label="Add room"]'));
|
||||
await browser.findElement(By.xpath('//div[@role="button" and @aria-label="Add room"]')).click();
|
||||
await browser.sleep(2000);
|
||||
await browser.findElement(By.xpath('//li[@role="menuitem" and @aria-label="New room"]')).click();
|
||||
await browser.sleep(2000);
|
||||
|
||||
await browser.findElement(By.xpath('//input[@label="Name"]')).sendKeys(ROOM_NAME);
|
||||
await browser.sleep(2000);
|
||||
|
||||
await browser.findElement(By.xpath('//button[text()="Create room"]')).click();
|
||||
await browser.sleep(2000);
|
||||
|
||||
await waitForElement(By.xpath('//div[@role="button" and @aria-label="Add room"]'));
|
||||
|
||||
await waitForElement(By.xpath('//div[@class="mx_RoomTile_titleContainer"]/div[@title="' + ROOM_NAME + '"]'));
|
||||
}
|
||||
|
||||
async function checkRoom() {
|
||||
await browser.get('https://' + app.fqdn + '/#/home');
|
||||
await browser.sleep(4000);
|
||||
await waitForElement(By.xpath('//div[@role="treeitem" and @aria-label="' + ROOM_NAME + '"]'));
|
||||
await browser.findElement(By.xpath('//div[@role="treeitem" and @aria-label="' + ROOM_NAME + '"]')).click();
|
||||
await browser.sleep(2000);
|
||||
await waitForElement(By.xpath('//h2[text()="' + ROOM_NAME + '"]'));
|
||||
}
|
||||
|
||||
async function sendMessage() {
|
||||
await checkRoom();
|
||||
|
||||
await browser.findElement(By.xpath('//div[contains(@class, "mx_BasicMessageComposer_input")]')).sendKeys(getMessage());
|
||||
await browser.sleep(2000);
|
||||
|
||||
await browser.findElement(By.xpath('//div[@role="button" and @aria-label="Send message"]')).click();
|
||||
await browser.sleep(2000);
|
||||
}
|
||||
|
||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||
|
||||
// No SSO
|
||||
it('install app (no sso)', function () { execSync('cloudron install --no-sso --location ' + LOCATION, EXEC_ARGS); });
|
||||
|
||||
it('can get app information', getAppInfo);
|
||||
|
||||
it('check landing page', checkLandingPage);
|
||||
it('can register new user', registerUser);
|
||||
it('can login', checkLogin);
|
||||
it('check autojoin', checkAutoJoinRoom);
|
||||
it('create room', createRoom);
|
||||
it('check room', checkRoom);
|
||||
|
||||
it('can install element-web app', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); });
|
||||
it('update element-app config', updateSynapseConfig);
|
||||
|
||||
it('can get Element app info', getElementAppInfo);
|
||||
it('can register new user', registerUser);
|
||||
it('create room', createRoom);
|
||||
it('can send message', sendMessage);
|
||||
|
||||
it('can logout', logout);
|
||||
|
||||
it('can login', login);
|
||||
it('check room', checkRoom);
|
||||
it('can logout', logout);
|
||||
|
||||
it('can get app info', getAppInfo);
|
||||
|
||||
it('uninstall element-web app', async function () {
|
||||
await browser.get('about:blank');
|
||||
execSync(`cloudron uninstall --app ${ELEMENT_LOCATION}`, EXEC_ARGS);
|
||||
});
|
||||
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
|
||||
|
||||
// SSO
|
||||
it('install app', function () { execSync('cloudron install --location ' + LOCATION, EXEC_ARGS); });
|
||||
it('can get app info', getAppInfo);
|
||||
|
||||
it('can get app information', getAppInfo);
|
||||
it('can install element-web app', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); });
|
||||
it('update element-app config', updateSynapseConfig);
|
||||
|
||||
it('check landing page', checkLandingPage);
|
||||
it('can login', checkLogin);
|
||||
it('check autojoin', checkAutoJoinRoom);
|
||||
it('can get Element app info', getElementAppInfo);
|
||||
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD));
|
||||
it('create room', createRoom);
|
||||
it('can send message', sendMessage);
|
||||
it('can get app info', getAppInfo);
|
||||
|
||||
it('can restart app', function () { execSync(`cloudron restart ${app.id}`); });
|
||||
|
||||
it('backup app', function () { execSync(`cloudron backup create --app ${app.id}`, EXEC_ARGS); });
|
||||
|
||||
it('can get Element app info', getElementAppInfo);
|
||||
it('is logged in', isLoggedIn);
|
||||
it('check room', checkRoom);
|
||||
it('can get app info', getAppInfo);
|
||||
|
||||
it('can restart app', function () { execSync('cloudron restart'); });
|
||||
it('restore app', async function () {
|
||||
const backups = JSON.parse(execSync(`cloudron backup list --raw --app ${app.id}`));
|
||||
|
||||
it('check landing page', checkLandingPage);
|
||||
it('check room', checkRoom);
|
||||
await browser.get('about:blank');
|
||||
execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS);
|
||||
execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS);
|
||||
|
||||
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
||||
|
||||
it('check landing page', checkLandingPage);
|
||||
it('check room', checkRoom);
|
||||
|
||||
it('restore app', function () {
|
||||
const backups = JSON.parse(execSync('cloudron backup list --raw'));
|
||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||
execSync('cloudron install --location ' + LOCATION, EXEC_ARGS);
|
||||
getAppInfo();
|
||||
|
||||
execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, EXEC_ARGS);
|
||||
});
|
||||
|
||||
it('check landing page', checkLandingPage);
|
||||
it('can get Element app info', getElementAppInfo);
|
||||
it('is logged in', isLoggedIn);
|
||||
it('check room', checkRoom);
|
||||
it('can send message', sendMessage);
|
||||
it('can logout', logout);
|
||||
it('can get app info', getAppInfo);
|
||||
|
||||
it('move to different location', function () {
|
||||
it('move to different location', async function () {
|
||||
browser.manage().deleteAllCookies();
|
||||
execSync('cloudron configure --location ' + LOCATION + '2', EXEC_ARGS);
|
||||
await browser.get('about:blank');
|
||||
|
||||
execSync(`cloudron configure --location ${LOCATION}2`, EXEC_ARGS);
|
||||
getAppInfo();
|
||||
// wait when all services are up and running
|
||||
await sleep(15000);
|
||||
});
|
||||
|
||||
it('check landing page', checkLandingPage);
|
||||
it('check room', checkRoom);
|
||||
it('update element-app config', updateSynapseConfig);
|
||||
|
||||
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
|
||||
it('can get Element app info', getElementAppInfo);
|
||||
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD));
|
||||
it('check room', checkRoom);
|
||||
it('can send message', sendMessage);
|
||||
|
||||
it('can logout', logout);
|
||||
it('can get app info', getAppInfo);
|
||||
|
||||
it('uninstall app', async function () {
|
||||
await browser.get('about:blank');
|
||||
execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS);
|
||||
});
|
||||
|
||||
// test update
|
||||
it('can install app', function () { execSync('cloudron install --appstore-id org.matrix.synapse --location ' + LOCATION, EXEC_ARGS); });
|
||||
it('can install app for update', function () { execSync('cloudron install --appstore-id org.matrix.synapse --location ' + LOCATION, EXEC_ARGS); });
|
||||
it('can get app info', getAppInfo);
|
||||
it('update element-app config', updateSynapseConfig);
|
||||
|
||||
it('can get app information', getAppInfo);
|
||||
it('can get Element app info', getElementAppInfo);
|
||||
|
||||
it('check landing page', checkLandingPage);
|
||||
it('can login', checkLogin);
|
||||
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD));
|
||||
it('is logged in', isLoggedIn);
|
||||
it('create room', createRoom);
|
||||
it('can send message', sendMessage);
|
||||
it('can logout', logout);
|
||||
it('can get app info', getAppInfo);
|
||||
|
||||
it('can update', async function () {
|
||||
await browser.get('about:blank');
|
||||
execSync(`cloudron update --app ${app.id}`, EXEC_ARGS);
|
||||
// wait when all services are up and running
|
||||
await sleep(15000);
|
||||
});
|
||||
|
||||
it('can get Element app info', getElementAppInfo);
|
||||
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD));
|
||||
it('is logged in', isLoggedIn);
|
||||
it('check room', checkRoom);
|
||||
it('can send message', sendMessage);
|
||||
it('can get app info', getAppInfo);
|
||||
|
||||
it('can update', function () { execSync('cloudron update --app ' + LOCATION, EXEC_ARGS); });
|
||||
it('uninstall app', async function () {
|
||||
await browser.get('about:blank');
|
||||
execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS);
|
||||
});
|
||||
|
||||
it('check landing page', checkLandingPage);
|
||||
it('check room', checkRoom);
|
||||
|
||||
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
|
||||
it('uninstall element-web app', function () {
|
||||
execSync(`cloudron uninstall --app ${ELEMENT_LOCATION}`, EXEC_ARGS);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user