1
0

Make offline UUIDs consistent with vanilla. (#4178)

Fixes #4177

This is a breaking change to existing Cuberite permissions settings.
This commit is contained in:
peterbell10
2018-07-20 00:30:09 +01:00
committed by GitHub
parent 211cec621e
commit 4fbf04413d
3 changed files with 59 additions and 12 deletions

View File

@@ -273,11 +273,9 @@ cUUID cClientHandle::GenerateOfflineUUID(const AString & a_Username)
// Online UUIDs are always version 4 (random)
// We use Version 3 (MD5 hash) UUIDs for the offline UUIDs
// This guarantees that they will never collide with an online UUID and can be distinguished.
// This is also consistent with the vanilla offline UUID scheme.
// First make the username lowercase:
AString lcUsername = StrToLower(a_Username);
return cUUID::GenerateVersion3(lcUsername);
return cUUID::GenerateVersion3("OfflinePlayer:" + a_Username);
}