mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
NetworkSession: compare usernames case-insensitively
the current data management system uses case-insensitive names, so we can't allow different players with the same name in different cases to join, or we will have duplication exploits. This typically only applies to offline servers, since Xbox Live doesn't permit reuse of a username, same case or otherwise. closes #4965
This commit is contained in:
parent
3bbf558883
commit
022db5cbe3
@ -635,7 +635,7 @@ class NetworkSession{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$info = $existingSession->getPlayerInfo();
|
$info = $existingSession->getPlayerInfo();
|
||||||
if($info !== null && ($info->getUsername() === $this->info->getUsername() || $info->getUuid()->equals($this->info->getUuid()))){
|
if($info !== null && (strcasecmp($info->getUsername(), $this->info->getUsername()) === 0 || $info->getUuid()->equals($this->info->getUuid()))){
|
||||||
if($kickForXUIDMismatch($info instanceof XboxLivePlayerInfo ? $info->getXuid() : "")){
|
if($kickForXUIDMismatch($info instanceof XboxLivePlayerInfo ? $info->getXuid() : "")){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user