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

Names of password reset HTML templates in config doesn't match python code #5833

Closed
anoadragon453 opened this issue Aug 8, 2019 · 1 comment
Assignees

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented Aug 8, 2019

Synapse is currently trying to put the wrong thing out of the email config for password reset templates.

What it's actually called (password_reset_template_success_html):

# #password_reset_template_success_html: password_reset_success.html

What it tries to pull out (password_reset_success_template):

"password_reset_success_template", "password_reset_success.html"

It's the same situation for the failure template.

Therefore, if someone tries to set up custom password reset success/failure pages, Synapse won't take them and consider using the defaults.

The only reason I don't think anyone's reported this yet is because they haven't had the desire to change their password reset success/failure pages from the default.

@anoadragon453 anoadragon453 self-assigned this Aug 8, 2019
anoadragon453 added a commit that referenced this issue Aug 15, 2019
Fixes #5833

The emailconfig code was attempting to pull incorrect config file names. This corrects that, while also marking a difference between a config file variable that's a filepath versus a str containing HTML.
@anoadragon453
Copy link
Member Author

Fixed in #5863

anoadragon453 added a commit that referenced this issue Aug 30, 2019
…il (#5835)

~~Fixes #5833 Moved out to ~~#5863
Part of fixing #5751

Decouples the activity of sending registration emails and binding them to an identity server.

This PR simply sends the registration email, but clicking it does not approve the user for registration. That will come in PR #2.

Some of this makes use of existing stuff for sending password reset emails from Synapse. Some work was done to make that stuff even more generic.

Upgrade notes:
* There is a new top-level config option, `account_threepid_delegate` which defines the address of an identity server that you would like to send registration/password reset emails on your behalf.

  The option `email.trust_identity_server_for_password_resets` has been replaced by this. If you set `email.trust_identity_server_for_password_resets` in your config to `true`, please remove it and configure `account_threepid_delegate` instead. The [sample config](https://github.com/matrix-org/synapse/blob/anoa/reg_email_sending_email/docs/sample_config.yaml) has information on how to configure it.

Note: This PR does not allow homeservers to send emails when simply adding an email to your account. That will come after this and will be blocked on a new MSC.

Part [2/2] will be successfully completing the registration step when `/submit_token` is hit with the correct details, and clearing out the `password_servlet` flag stuff, which is no longer needed. Will be a much smaller PR than this one.

~~Requires #5863 has been merged into the base branch.
~~Requires #5876 has been merged into the base branch.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant