mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-18 00:00:10 -04:00
parent
0922462fc7
commit
8e2759f2d8
3 changed files with 36 additions and 1 deletions
|
@ -342,6 +342,15 @@ class LoginRestServlet(RestServlet):
|
|||
user_id = canonical_uid
|
||||
|
||||
device_id = login_submission.get("device_id")
|
||||
|
||||
# If device_id is present, check that device_id is not longer than a reasonable 512 characters
|
||||
if device_id and len(device_id) > 512:
|
||||
raise LoginError(
|
||||
400,
|
||||
"device_id cannot be longer than 512 characters.",
|
||||
errcode=Codes.INVALID_PARAM,
|
||||
)
|
||||
|
||||
initial_display_name = login_submission.get("initial_device_display_name")
|
||||
(
|
||||
device_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue