Fix slice out of bounds in federation API
MODIFY
federationapi/storage/shared/storage.go
federationapi/storage/shared/storage.go
@@ -125,7 +125,9 @@ func (d *Database) GetJoinedHostsForRooms(ctx context.Context, roomIDs []string,
if excludeSelf {
for i, server := range servers {
if d.IsLocalServerName(server) {
- servers = append(servers[:i], servers[i+1:]...)
+ copy(servers[:i], servers[i+1:])
+ servers = servers[:len(servers)-1]
+ break
}
}
}

Fix slice out of bounds in federation API