0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-06-02 20:49:04 +02:00

Compare commits

...

2 commits

Author SHA1 Message Date
CicadaCinema 3b1c73781a
Merge 22ce531e3c into b732eede27 2024-03-28 22:17:15 +01:00
CicadaCinema 22ce531e3c allow numeric usernames less than MAX_INT64 2024-02-11 11:12:36 +00:00
2 changed files with 1 additions and 7 deletions

View file

@ -513,13 +513,6 @@ func Register(
return handleGuestRegistration(req, r, cfg, userAPI) return handleGuestRegistration(req, r, cfg, userAPI)
} }
// Don't allow numeric usernames less than MAX_INT64.
if _, err = strconv.ParseInt(r.Username, 10, 64); err == nil {
return util.JSONResponse{
Code: http.StatusBadRequest,
JSON: spec.InvalidUsername("Numeric user IDs are reserved"),
}
}
// Auto generate a numeric username if r.Username is empty // Auto generate a numeric username if r.Username is empty
if r.Username == "" { if r.Username == "" {
nreq := &userapi.QueryNumericLocalpartRequest{ nreq := &userapi.QueryNumericLocalpartRequest{

View file

@ -709,6 +709,7 @@ PUT /rooms/:room_id/redact/:event_id/:txn_id is idempotent
Unnamed room comes with a name summary Unnamed room comes with a name summary
Named room comes with just joined member count summary Named room comes with just joined member count summary
Room summary only has 5 heroes Room summary only has 5 heroes
registration is idempotent, without username specified
registration is idempotent, with username specified registration is idempotent, with username specified
Setting state twice is idempotent Setting state twice is idempotent
Joining room twice is idempotent Joining room twice is idempotent