diff --git a/src/pocketmine/command/defaults/TimingsCommand.php b/src/pocketmine/command/defaults/TimingsCommand.php index d19378c64..a78ecd51f 100644 --- a/src/pocketmine/command/defaults/TimingsCommand.php +++ b/src/pocketmine/command/defaults/TimingsCommand.php @@ -126,7 +126,7 @@ class TimingsCommand extends VanillaCommand{ } list(, $headers) = $result; foreach($headers as $headerGroup){ - if(isset($headerGroup["location"]) and preg_match('#^http://paste\\.ubuntu\\.com/([0-9]{1,})/#', trim($headerGroup["location"]), $match)){ + if(isset($headerGroup["location"]) and preg_match('#^http://paste\\.ubuntu\\.com/([A-Za-z0-9+\/=]+)/#', trim($headerGroup["location"]), $match)){ $pasteId = $match[1]; break; } @@ -134,7 +134,7 @@ class TimingsCommand extends VanillaCommand{ if(isset($pasteId)){ $sender->sendMessage(new TranslationContainer("pocketmine.command.timings.timingsUpload", ["http://paste.ubuntu.com/" . $pasteId . "/"])); $sender->sendMessage(new TranslationContainer("pocketmine.command.timings.timingsRead", - ["http://" . $sender->getServer()->getProperty("timings.host", "timings.pmmp.io") . "/?url=$pasteId"])); + ["http://" . $sender->getServer()->getProperty("timings.host", "timings.pmmp.io") . "/?url=" . urlencode($pasteId)])); }else{ $sender->sendMessage(new TranslationContainer("pocketmine.command.timings.pasteError")); }