Limit displaynames and avatar URLs

These end up in join events everywhere, so let's limit them.

Fixes #5079
This commit is contained in:
Richard van der Hoff 2019-06-01 10:42:33 +01:00
parent e26e6b3230
commit d16c6375fe
3 changed files with 16 additions and 0 deletions

View file

@ -531,6 +531,8 @@ class RegistrationHandler(BaseHandler):
A tuple of (user_id, access_token).
Raises:
RegistrationError if there was a problem registering.
NB this is only used in tests. TODO: move it to the test package!
"""
if localpart is None:
raise SynapseError(400, "Request must include user id")