mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Review comments
This commit is contained in:
parent
c1518b4e98
commit
63daa2390c
|
|
@ -119,6 +119,13 @@ func SetAvatarURL(
|
||||||
return jsonerror.InternalServerError()
|
return jsonerror.InternalServerError()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !cfg.Matrix.IsLocalServerName(domain) {
|
||||||
|
return util.JSONResponse{
|
||||||
|
Code: http.StatusForbidden,
|
||||||
|
JSON: jsonerror.Forbidden("userID does not belong to a locally configured domain"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
evTime, err := httputil.ParseTSParam(req)
|
evTime, err := httputil.ParseTSParam(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
|
|
@ -211,6 +218,13 @@ func SetDisplayName(
|
||||||
return jsonerror.InternalServerError()
|
return jsonerror.InternalServerError()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !cfg.Matrix.IsLocalServerName(domain) {
|
||||||
|
return util.JSONResponse{
|
||||||
|
Code: http.StatusForbidden,
|
||||||
|
JSON: jsonerror.Forbidden("userID does not belong to a locally configured domain"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
evTime, err := httputil.ParseTSParam(req)
|
evTime, err := httputil.ParseTSParam(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
|
|
|
||||||
|
|
@ -548,6 +548,9 @@ func (a *UserInternalAPI) PerformAccountDeactivation(ctx context.Context, req *a
|
||||||
if serverName == "" {
|
if serverName == "" {
|
||||||
serverName = a.Config.Matrix.ServerName
|
serverName = a.Config.Matrix.ServerName
|
||||||
}
|
}
|
||||||
|
if !a.Config.Matrix.IsLocalServerName(serverName) {
|
||||||
|
return fmt.Errorf("server name %q not locally configured", serverName)
|
||||||
|
}
|
||||||
|
|
||||||
evacuateReq := &rsapi.PerformAdminEvacuateUserRequest{
|
evacuateReq := &rsapi.PerformAdminEvacuateUserRequest{
|
||||||
UserID: fmt.Sprintf("@%s:%s", req.Localpart, serverName),
|
UserID: fmt.Sprintf("@%s:%s", req.Localpart, serverName),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue