mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
Check user ID matches
This commit is contained in:
parent
7dbd4b6448
commit
8a8da6bf77
|
|
@ -468,10 +468,14 @@ func (u *DeviceListUpdater) processServerUser(ctx context.Context, serverName go
|
|||
}
|
||||
default:
|
||||
// Something else failed
|
||||
logger.WithError(err).WithField("user_id", userID).Debugf("GetUserDevices returned unknown error type: %T", err)
|
||||
logger.WithError(err).Debugf("GetUserDevices returned unknown error type: %T", err)
|
||||
return time.Minute * 10, err
|
||||
}
|
||||
}
|
||||
if res.UserID != userID {
|
||||
logger.WithError(err).Warnf("User ID %q in device list update response doesn't match expected %q", res.UserID, userID)
|
||||
return defaultWaitTime, nil
|
||||
}
|
||||
if res.MasterKey != nil || res.SelfSigningKey != nil {
|
||||
uploadReq := &api.PerformUploadDeviceKeysRequest{
|
||||
UserID: userID,
|
||||
|
|
@ -491,7 +495,7 @@ func (u *DeviceListUpdater) processServerUser(ctx context.Context, serverName go
|
|||
}
|
||||
err = u.updateDeviceList(&res)
|
||||
if err != nil {
|
||||
logger.WithError(err).WithField("user_id", userID).Error("Fetched device list but failed to store/emit it")
|
||||
logger.WithError(err).Error("Fetched device list but failed to store/emit it")
|
||||
return defaultWaitTime, err
|
||||
}
|
||||
return defaultWaitTime, nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue