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

Error sending threepid validation email ... yield send_email_func(email_address, token, client_secret, session_id) ValueError: unsupported format character 'S' (0x53) at index 7 #6422

Closed
phtmgt opened this issue Nov 27, 2019 · 8 comments

Comments

@phtmgt
Copy link

phtmgt commented Nov 27, 2019

Description

Cannot register with an e-mail address.

Steps to reproduce

  • try to register with a supplied e-mail address
  • 'An error was encountered when sending the email' error on frontend
  • error in the title in backend

When trying to supply an e-mail at register, we get the error in the title.

Version information

  • Homeserver: 1.5.1+bionic1

If not matrix.org:

  • Version: 1.5.1+bionic1

  • Install method: Debian through matrix-synapse repo

  • Platform: Ubuntu 18.04

I already tried changing the shared_secret (remove '%' from it). Also checked email_address, token, client_secret, and session id, they don't have any strange characters, especially capital 'S'.

@phtmgt
Copy link
Author

phtmgt commented Nov 27, 2019

I was able to fix it, still believe this is a bug that should be addressed. Problem was in homeserver.yaml:

notif_from: "%(app) Server <matrix

changed it to:

notif_from: "%(app) server <matrix

and it worked.

Using capital S breaks the email sending, this seems like a very strange bug. Escape it somewhere in code or at least add a comment to the documentation (don't use a Capital S?).

@richvdh
Copy link
Member

richvdh commented Nov 27, 2019

you need %(app)s, not %(app)

@richvdh richvdh closed this as completed Nov 27, 2019
@phtmgt
Copy link
Author

phtmgt commented Nov 27, 2019

@richvdh Not really. The issue is completely different. I managed to find a workaround (my previous comment), but this is definitely a limitation that at least needs to be documented.

@richvdh
Copy link
Member

richvdh commented Nov 27, 2019

Have you tried writing notif_from: "%(app)s Server <matrix... ?

@phtmgt
Copy link
Author

phtmgt commented Nov 27, 2019

This works:

"%(app) server <matrix

Probably your solution works as well. Just saying it's a good idea for it to be documented somehow (here in github or in homeserver.yaml comments).

@richvdh
Copy link
Member

richvdh commented Nov 27, 2019

This works:

"%(app) server <matrix

are you sure? Have you checked what comes out? The placeholder for the app name is %(app)s. It is not %(app).

@richvdh
Copy link
Member

richvdh commented Nov 27, 2019

@plamenh does https://github.com/matrix-org/synapse/pull/6423/files#diff-8b49bb218a1d7b96778287934cc311eaR1277 help to clarify that? Feel free to comment on that PR if you have further suggestions

@phtmgt
Copy link
Author

phtmgt commented Nov 28, 2019

Ok, you might have a point there. What I get in the from field is:

Matrixerver instead of Matrix server

With the s there it works as expected.

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

2 participants