mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-22 03:31:41 +00:00
Fix slice out of bounds in federation API
This commit is contained in:
parent
d558da1c87
commit
a2f72dd966
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user