From 238b3ca4c1d10bb2f8010b070425482c6780ed9d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 24 Aug 2017 12:51:46 +0100 Subject: [PATCH 1/2] 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 56c8767db..d95d60bcb 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); } From 3ee8f2b182a653f74a7cf69b2f6a44f8ba0b26d4 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 24 Aug 2017 19:26:11 +0100 Subject: [PATCH 2/2] Require RakLib version 0.8.1 --- src/pocketmine/PocketMine.php | 6 ++++++ src/raklib | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index fd80f55c1..dbb1007c6 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -144,6 +144,12 @@ namespace pocketmine { exit(1); } + if(version_compare(RakLib::VERSION, "0.8.1") < 0){ + echo "[CRITICAL] RakLib version 0.8.1 is required, while you have version " . RakLib::VERSION . "." . PHP_EOL; + echo "[CRITICAL] Please update your submodules or use provided builds." . PHP_EOL; + exit(1); + } + set_time_limit(0); //Who set it to 30 seconds?!?! ini_set("allow_url_fopen", '1'); diff --git a/src/raklib b/src/raklib index 3b1ca9c1b..1fee79e4a 160000 --- a/src/raklib +++ b/src/raklib @@ -1 +1 @@ -Subproject commit 3b1ca9c1bedf1a18ef40757665bf8c9e7e769c9c +Subproject commit 1fee79e4aac0f958ab720606e223b0aa690f5c47