Compare commits

...

26 Commits

Author SHA1 Message Date
Johannes Zellner
fbf55b9162 Bump version for 1.33.2 2021-05-14 10:40:12 +02:00
Johannes Zellner
d27523bc00 Update test deps 2021-05-08 18:23:49 +02:00
Johannes Zellner
fad354943f Bump version for 1.23.1 2021-05-08 18:23:02 +02:00
Johannes Zellner
a4b8455363 Bump version for 1.33.0 2021-05-06 10:21:14 +02:00
Johannes Zellner
dc25932bfd Bump version for 1.32.2 2021-04-22 12:36:21 +02:00
Johannes Zellner
908481d2c6 Bump version for 1.32.1 2021-04-22 10:37:22 +02:00
Johannes Zellner
bcbb54c9be Fixup changelog 2021-04-20 18:07:50 +02:00
Johannes Zellner
d749c8f974 Update test deps 2021-04-20 17:39:39 +02:00
Johannes Zellner
169510a50d Bump version for 1.32.0 2021-04-20 17:38:49 +02:00
Johannes Zellner
bd6d954ddd Do not redirect stdio to logfile 2021-04-08 14:52:34 +02:00
Girish Ramakrishnan
c39c97bf64 Version 1.22.0 2021-04-06 15:40:25 -07:00
Girish Ramakrishnan
007f0607fd Update synapse to 1.31.0 2021-04-06 15:39:53 -07:00
Johannes Zellner
a53664b9b1 Update test deps 2021-03-26 14:55:57 +01:00
Johannes Zellner
53f7612ba9 Bump version for 1.30.1 2021-03-26 14:54:03 +01:00
Girish Ramakrishnan
d51a1d3b40 Version 1.21.0 2021-03-22 11:02:48 -07:00
Girish Ramakrishnan
e0abc92551 Update synapse to 1.30.0 2021-03-22 10:40:03 -07:00
Girish Ramakrishnan
98fc17e9d3 Version 1.20.0 2021-03-08 09:39:15 -08:00
Girish Ramakrishnan
aa32c3c771 Update synapse to 1.29.0 2021-03-08 09:27:43 -08:00
Girish Ramakrishnan
d7e26b3687 Version 1.19.0 2021-02-26 13:10:14 -08:00
Girish Ramakrishnan
2882a804c8 Update synapse to 1.28.0 2021-02-26 12:17:37 -08:00
Girish Ramakrishnan
a1ffa1e1dc Version 1.18.0 2021-02-16 12:29:45 -08:00
Girish Ramakrishnan
15672eddc2 v4 yq has different syntax 2021-02-16 12:14:39 -08:00
Girish Ramakrishnan
022881e357 Fix base image 2021-02-16 11:39:04 -08:00
Girish Ramakrishnan
8d92d05a90 Update test packages 2021-02-05 21:56:47 -08:00
Girish Ramakrishnan
f97dde4b75 python is 3.8 2021-02-05 21:54:24 -08:00
Girish Ramakrishnan
d3b63b30a0 Update base image 2021-02-05 21:51:43 -08:00
7 changed files with 474 additions and 872 deletions

109
CHANGELOG
View File

@@ -305,3 +305,112 @@
* Add an admin API for protecting local media from quarantine. (#9086) * Add an admin API for protecting local media from quarantine. (#9086)
* Remove a user's avatar URL and display name when deactivated with the Admin API. (#8932) * Remove a user's avatar URL and display name when deactivated with the Admin API. (#8932)
[1.18.0]
* Update Synapse to 1.27.0
* Use base image v3
* Update python to 3.8
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.27.0)
* Add an admin API for getting and deleting forward extremities for a room. (#9062)
* Add an admin API for retrieving the current room state of a room. (#9168)
* Add an admin API endpoint for shadow-banning users. (#9209)
[1.19.0]
* Update Synapse to 1.28.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.28.0)
* New admin API to get the context of an event: /_synapse/admin/rooms/{roomId}/context/{eventId}. (#9150)
* Further improvements to the user experience of registration via single sign-on. (#9300, #9301)
* Add hook to spam checker modules that allow checking file uploads and remote downloads. (#9311)
* Add support for receiving OpenID Connect authentication responses via form POSTs rather than GETs. (#9376)
* Add the shadow-banning status to the admin API for user info. (#9400)
[1.20.0]
* Update Synapse to 1.29.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.29.0)
* Add rate limiters to cross-user key sharing requests. (#8957)
* Add order_by to the admin API GET /_synapse/admin/v1/users/<user_id>/media. Contributed by @dklimpel. (#8978)
* Add some configuration settings to make users' profile data more private. (#9203)
* The no_proxy and NO_PROXY environment variables are now respected in proxied HTTP clients with the lowercase form taking precedence if both are present. Additionally, the lowercase https_proxy environment variable is now respected in proxied HTTP clients on top of existing support for the uppercase HTTPS_PROXY form and takes precedence if both are present. Contributed by Timothy Leung. (#9372)
* Add a configuration option, user_directory.prefer_local_users, which when enabled will make it more likely for users on the same server as you to appear above other users. (#9383, #9385)
* Add support for regenerating thumbnails if they have been deleted but the original image is still stored. (#9438)
[1.21.0]
* Update Synapse to 1.30.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.30.0)
* Add prometheus metrics for number of users successfully registering and logging in. (#9510, #9511, #9573)
* Add synapse_federation_last_sent_pdu_time and synapse_federation_last_received_pdu_time prometheus metrics, which monitor federation delays by reporting the timestamps of messages sent and received to a set of remote servers. (#9540)
* Add support for generating JSON Web Tokens dynamically for use as OIDC client secrets. (#9549)
* Optimise handling of incomplete room history for incoming federation. (#9601)
* Finalise support for allowing clients to pick an SSO Identity Provider (MSC2858). (#9617)
* Tell spam checker modules about the SSO IdP a user registered through if one was used. (#9626)
[1.21.1]
* Update Synapse to 1.30.1
[1.22.0]
* Update Synapse to 1.31.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.31.0)
* Add support to OpenID Connect login for requiring attributes on the userinfo response. Contributed by Hubbe King. (#9609)
* Add initial experimental support for a "space summary" API. (#9643, #9652, #9653)
* Add support for the busy presence state as described in MSC3026. (#9644)
* Add support for credentials for proxy authentication in the HTTPS_PROXY environment variable. (#9657)
[1.22.1]
* Update Synapse to 1.32.0
* Add a Synapse module for routing presence updates between users. (#9491)
* Add an admin API to manage ratelimit for a specific user. (#9648)
* Include request information in structured logging output. (#9654)
* Add order_by to the admin API GET /_synapse/admin/v2/users. Contributed by @dklimpel. (#9691)
* Replace the room_invite_state_types configuration setting with room_prejoin_state. (#9700)
* Add experimental support for MSC3083: restricting room access via group membership. (#9717, #9735)
* Update experimental support for Spaces: include m.room.create in the room state sent with room-invites. (#9710)
* Synapse now requires Python 3.6 or later. It also requires Postgres 9.6 or later or SQLite 3.22 or later. (#9766)
* Prevent synapse_forward_extremities and synapse_excess_extremity_events Prometheus metrics from initially reporting zero-values after startup. (#8926)
* Fix recently added ratelimits to correctly honour the application service rate_limited flag. (#9711)
* Fix longstanding bug which caused duplicate key value violates unique constraint "remote_media_cache_thumbnails_media_origin_media_id_thumbna_key" errors. (#9725)
* Fix bug where sharded federation senders could get stuck repeatedly querying the DB in a loop, using lots of CPU. (#9770)
* Fix duplicate logging of exceptions thrown during federation transaction processing. (#9780)
[1.22.2]
* Update Synapse to 1.32.0
* Add a Synapse module for routing presence updates between users. (#9491)
* Add an admin API to manage ratelimit for a specific user. (#9648)
* Include request information in structured logging output. (#9654)
* Add order_by to the admin API GET /_synapse/admin/v2/users. Contributed by @dklimpel. (#9691)
* Replace the room_invite_state_types configuration setting with room_prejoin_state. (#9700)
* Add experimental support for MSC3083: restricting room access via group membership. (#9717, #9735)
* Update experimental support for Spaces: include m.room.create in the room state sent with room-invites. (#9710)
* Synapse now requires Python 3.6 or later. It also requires Postgres 9.6 or later or SQLite 3.22 or later. (#9766)
* Prevent synapse_forward_extremities and synapse_excess_extremity_events Prometheus metrics from initially reporting zero-values after startup. (#8926)
* Fix recently added ratelimits to correctly honour the application service rate_limited flag. (#9711)
* Fix longstanding bug which caused duplicate key value violates unique constraint "remote_media_cache_thumbnails_media_origin_media_id_thumbna_key" errors. (#9725)
* Fix bug where sharded federation senders could get stuck repeatedly querying the DB in a loop, using lots of CPU. (#9770)
* Fix duplicate logging of exceptions thrown during federation transaction processing. (#9780)
[1.22.3]
* Update Synapse to 1.32.1
* Fix a regression in Synapse 1.32.0 which caused Synapse to report large numbers of Prometheus time series, potentially overwhelming Prometheus instances. (#9854)
[1.22.4]
* Update Synapse to 1.32.2
* Fix a regression in Synapse 1.32.0 and 1.32.1 which caused LoggingContext errors in plugins. (#9857)
[1.23.0]
* Update Synapse to 1.33.0
* Update experimental support for MSC3083: restricting room access via group membership. (#9800, #9814)
* Add experimental support for handling presence on a worker. (#9819, #9820, #9828, #9850)
* Return a new template when an user attempts to renew their account multiple times with the same token, stating that their account is set to expire. This replaces the invalid token template that would previously be shown in this case. This change concerns the optional account validity feature. (#9832)
* Fixes the OIDC SSO flow when using a public_baseurl value including a non-root URL path. (#9726)
* Fix thumbnail generation for some sites with non-standard content types. Contributed by @rkfg. (#9788)
* Add some sanity checks to identity server passed to 3PID bind/unbind endpoints. (#9802)
* Limit the size of HTTP responses read over federation. (#9833)
* Fix a bug which could cause Synapse to get stuck in a loop of resyncing device lists. (#9867)
* Fix a long-standing bug where errors from federation did not propagate to the client. (#9868)
[1.23.1]
* Update Synapse to 1.33.1
* Fix bug where /sync would break if using the latest version of attrs dependency, by pinning to a previous version. (#9937)
[1.23.2]
* Update Synapse to 1.33.2
* This release fixes a denial of service attack (CVE-2021-29471) against Synapse's push rules implementation.

View File

@@ -5,7 +5,7 @@
"description": "file://DESCRIPTION.md", "description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG", "changelog": "file://CHANGELOG",
"tagline": "Secure & decentralized communication", "tagline": "Secure & decentralized communication",
"version": "1.17.0", "version": "1.23.2",
"healthCheckPath": "/", "healthCheckPath": "/",
"httpPort": 8008, "httpPort": 8008,
"memoryLimit": 536870912, "memoryLimit": 536870912,

View File

@@ -1,4 +1,4 @@
This app packages Synapse <upstream>1.26.0</upstream>. This app packages Synapse <upstream>1.33.2</upstream>.
**This package only provides the Matrix backend. A variety of clients are available **This package only provides the Matrix backend. A variety of clients are available
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and [here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and

View File

@@ -1,26 +1,23 @@
FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4 FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92
RUN mkdir -p /app/pkg RUN mkdir -p /app/pkg
WORKDIR /app/code WORKDIR /app/code
ARG VERSION=v1.26.0
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/ # https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
RUN virtualenv -p python3 /app/code/env RUN virtualenv -p python3 /app/code/env
ENV VIRTUAL_ENV=/app/code/env ENV VIRTUAL_ENV=/app/code/env
ENV PATH="$VIRTUAL_ENV/bin:$PATH" ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ARG VERSION=v1.33.2
# Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md) # Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md)
# lxml - required for previews # lxml - required for previews
RUN pip install --upgrade pip && \ RUN pip install --upgrade pip && \
pip install --upgrade setuptools && \ pip install --upgrade setuptools && \
pip install matrix-synapse==${VERSION} psycopg2-binary python-ldap matrix-synapse-ldap3 lxml publicsuffix2 pip install matrix-synapse==${VERSION} psycopg2-binary python-ldap matrix-synapse-ldap3 lxml publicsuffix2
RUN curl -sL https://github.com/mikefarah/yq/releases/download/3.2.1/yq_linux_amd64 -o /usr/bin/yq && \ RUN ln -sf /app/data/index.html /app/code/env/lib/python3.8/site-packages/synapse/static/index.html
chmod +x /usr/bin/yq
RUN ln -sf /app/data/index.html /app/code/env/lib/python3.6/site-packages/synapse/static/index.html
RUN chown -R cloudron.cloudron /app/code RUN chown -R cloudron.cloudron /app/code

View File

@@ -16,67 +16,68 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
--config-directory /app/data/configs \ --config-directory /app/data/configs \
--data-directory /app/data/data \ --data-directory /app/data/data \
--generate-config \ --generate-config \
--report-stats=no --report-stats=no
# fix logging configuration # fix logging configuration
cp /app/pkg/homeserver.yaml.template /app/data/configs/homeserver.yaml cp /app/pkg/homeserver.yaml.template /app/data/configs/homeserver.yaml
mv /app/data/configs/${server_name}.log.config /app/data/configs/log.config mv /app/data/configs/${server_name}.log.config /app/data/configs/log.config
yq w -i /app/data/configs/homeserver.yaml log_config /app/data/configs/log.config yq eval -i ".log_config=\"/app/data/configs/log.config\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/log.config handlers.file.filename /run/synapse/homeserver.log yq eval -i ".handlers.file.filename=\"/run/synapse/homeserver.log\"" /app/data/configs/log.config
mv /app/data/configs/${server_name}.signing.key /app/data/configs/signing.key mv /app/data/configs/${server_name}.signing.key /app/data/configs/signing.key
yq w -i /app/data/configs/homeserver.yaml server_name "${server_name}" yq eval -i ".server_name=\"${server_name}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml registration_shared_secret "$(pwgen -1s 64)" yq eval -i ".registration_shared_secret=\"$(pwgen -1s 64)\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml auto_join_rooms "[]" yq eval -i ".auto_join_rooms=[]" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml auto_join_rooms\[0\] "#discuss:${server_name}" yq eval -i ".auto_join_rooms[0]=\"#discuss:${server_name}\"" /app/data/configs/homeserver.yaml
if [[ -z "${CLOUDRON_LDAP_SERVER:-}" ]]; then if [[ -z "${CLOUDRON_LDAP_SERVER:-}" ]]; then
yq w -i /app/data/configs/homeserver.yaml enable_registration true yq eval -i ".enable_registration=true" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml password_config.pepper "$(pwgen -1s 12)" yq eval -i ".password_config.pepper=\"$(pwgen -1s 12)\"" /app/data/configs/homeserver.yaml
fi fi
fi fi
[[ ! -f /app/data/index.html ]] && cp /app/pkg/index.html /app/data/index.html [[ ! -f /app/data/index.html ]] && cp /app/pkg/index.html /app/data/index.html
echo "==> Configuring synapse" echo "==> Configuring synapse"
yq w -i /app/data/configs/homeserver.yaml public_baseurl "${CLOUDRON_APP_ORIGIN}" yq eval -i ".public_baseurl=\"${CLOUDRON_APP_ORIGIN}\"" /app/data/configs/homeserver.yaml
# database # database
yq w -i /app/data/configs/homeserver.yaml database.args.user "${CLOUDRON_POSTGRESQL_USERNAME}" yq eval -i ".database.args.user=\"${CLOUDRON_POSTGRESQL_USERNAME}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml database.args.password "${CLOUDRON_POSTGRESQL_PASSWORD}" yq eval -i ".database.args.password=\"${CLOUDRON_POSTGRESQL_PASSWORD}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml database.args.database "${CLOUDRON_POSTGRESQL_DATABASE}" yq eval -i ".database.args.database=\"${CLOUDRON_POSTGRESQL_DATABASE}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml database.args.host "${CLOUDRON_POSTGRESQL_HOST}" yq eval -i ".database.args.host=\"${CLOUDRON_POSTGRESQL_HOST}\"" /app/data/configs/homeserver.yaml
# email # email
yq w -i /app/data/configs/homeserver.yaml email.smtp_host "${CLOUDRON_MAIL_SMTP_SERVER}" yq eval -i ".email.smtp_host=\"${CLOUDRON_MAIL_SMTP_SERVER}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml email.smtp_port "${CLOUDRON_MAIL_SMTP_PORT}" yq eval -i ".email.smtp_port=${CLOUDRON_MAIL_SMTP_PORT}" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml email.smtp_user "${CLOUDRON_MAIL_SMTP_USERNAME}" yq eval -i ".email.smtp_user=\"${CLOUDRON_MAIL_SMTP_USERNAME}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml email.smtp_pass "${CLOUDRON_MAIL_SMTP_PASSWORD}" yq eval -i ".email.smtp_pass=\"${CLOUDRON_MAIL_SMTP_PASSWORD}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml email.notif_from "%(app)s <${CLOUDRON_MAIL_FROM}>" yq eval -i ".email.notif_from=\"%(app)s <${CLOUDRON_MAIL_FROM}>\"" /app/data/configs/homeserver.yaml
# ldap # ldap
if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then
yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.uri' "${CLOUDRON_LDAP_URL}" yq eval -i ".password_providers[0].config.uri=\"${CLOUDRON_LDAP_URL}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.start_tls' false yq eval -i ".password_providers[0].config.start_tls=false" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.base' "${CLOUDRON_LDAP_USERS_BASE_DN}" yq eval -i ".password_providers[0].config.base=\"${CLOUDRON_LDAP_USERS_BASE_DN}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.bind_dn' "${CLOUDRON_LDAP_BIND_DN}" yq eval -i ".password_providers[0].config.bind_dn=\"${CLOUDRON_LDAP_BIND_DN}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.bind_password' "${CLOUDRON_LDAP_BIND_PASSWORD}" yq eval -i ".password_providers[0].config.bind_password=\"${CLOUDRON_LDAP_BIND_PASSWORD}\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.filter' "(objectClass=user)" yq eval -i ".password_providers[0].config.filter=\"(objectClass=user)\"" /app/data/configs/homeserver.yaml
else else
yq w -i /app/data/configs/homeserver.yaml password_config.localdb_enabled true yq eval -i ".password_config.localdb_enabled=true" /app/data/configs/homeserver.yaml
fi fi
# turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup) # turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup)
yq w -i /app/data/configs/homeserver.yaml turn_uris "[]" yq eval -i ".turn_uris=[]" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml turn_uris\[0\] "turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=udp" yq eval -i ".turn_uris[0]=\"turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=udp\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml turn_uris\[1\] "turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=tcp" yq eval -i ".turn_uris[1]=\"turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=tcp\"" /app/data/configs/homeserver.yaml
yq w -i /app/data/configs/homeserver.yaml turn_shared_secret "${CLOUDRON_TURN_SECRET}" yq eval -i ".turn_shared_secret=\"${CLOUDRON_TURN_SECRET}\"" /app/data/configs/homeserver.yaml
# fix permissions # fix permissions
echo "==> Fixing permissions" echo "==> Fixing permissions"
chown -R cloudron.cloudron /app/data /run/synapse chown -R cloudron.cloudron /app/data /run/synapse
echo "==> Starting synapse" echo "==> Starting synapse"
gosu cloudron:cloudron python3 -m synapse.app.homeserver --config-path /app/data/configs/homeserver.yaml gosu cloudron:cloudron python3 -m synapse.app.homeserver --config-path /app/data/configs/homeserver.yaml -n

1152
test/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,12 +9,9 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"chromedriver": "^86.0.0", "chromedriver": "^90.0.0",
"ejs": "^3.1.5",
"expect.js": "^0.3.1", "expect.js": "^0.3.1",
"mkdirp": "^1.0.4", "mocha": "^8.4.0",
"mocha": "^8.1.3",
"rimraf": "^3.0.2",
"selenium-server-standalone-jar": "^3.141.59", "selenium-server-standalone-jar": "^3.141.59",
"selenium-webdriver": "^3.6.0", "selenium-webdriver": "^3.6.0",
"superagent": "^6.1.0" "superagent": "^6.1.0"