YunoHost-Apps / synapse_ynh

Matrix server (synapse) package for YunoHost
https://matrix.org/
GNU General Public License v3.0
79 stars 42 forks source link

synapse_ynh corrupted form_secret and deleted itself during upgrade #373

Closed nykula closed 2 days ago

nykula commented 1 year ago

Describe the bug

I tried upgrading from 1.77 to 1.79, the upgrade failed, automatic restoration of the pre-upgrade backup also failed, and I no longer see Synapse in the list of applications.

Moreover, form_secret in apps/synapse/backup/etc/matrix-synapse/homeserver.yaml from the pre-upgrade backup seems corrupted, with __FORM_SECRET__ appearing in place of every & in the secret. I think this command from the log was responsible for this:

sed --in-place 's@__FORM_SECRET__@...something_containing_&_characters...@g' /etc/matrix-synapse/homeserver.yaml

Context

Steps to reproduce

I went to the updates page in the YunoHost web UI, let it update applications including Synapse, and got an error.

Logs

I tried the automatic YunoPaste, but I see multiple leaks of macaroon_secret_key and form_secret and registration_shared_secret in the log so I won't publicly post the original paste.yunohost.org link, only a copy where I manually replace my values with <REDACTED>: https://paste.yunohost.org/raw/ivayobipux

nykula commented 1 year ago

I recovered Synapse by completely removing Akkoma, removing leftover permissions from failed Synapse backup restoration, and restoring the Synapse backup again.

However, the issue with corruption of secrets with & during backup/restore remains.

Josue-T commented 2 days ago

Closing as it should be fixed now with last release.