From 238b3ca4c1d10bb2f8010b070425482c6780ed9d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 24 Aug 2017 12:51:46 +0100 Subject: [PATCH] Fixed UUID variant corruption in UUID->toString(), close #1286 This class may encapsulate any type of UUID, not just RFC 4122. Additionally, an RFC 4122 UUID may have this set as 8, 9, A or B. --- src/pocketmine/utils/UUID.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pocketmine/utils/UUID.php b/src/pocketmine/utils/UUID.php index 56c8767db7..d95d60bcb1 100644 --- a/src/pocketmine/utils/UUID.php +++ b/src/pocketmine/utils/UUID.php @@ -94,9 +94,6 @@ class UUID{ $hex = bin2hex($this->toBinary()); //xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx 8-4-4-4-12 - if($this->version !== null){ - return substr($hex, 0, 8) . "-" . substr($hex, 8, 4) . "-" . hexdec($this->version) . substr($hex, 13, 3) . "-8" . substr($hex, 17, 3) . "-" . substr($hex, 20, 12); - } return substr($hex, 0, 8) . "-" . substr($hex, 8, 4) . "-" . substr($hex, 12, 4) . "-" . substr($hex, 16, 4) . "-" . substr($hex, 20, 12); }