From 178dcb71a9a1139527dbb9ff2229dbcd61735e5c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 12 Dec 2021 23:27:50 +0000 Subject: [PATCH] Release 4.0.2 --- changelogs/4.0.md | 18 ++++++++++++++++++ src/VersionInfo.php | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/changelogs/4.0.md b/changelogs/4.0.md index 4fc8c4af4..2ba259372 100644 --- a/changelogs/4.0.md +++ b/changelogs/4.0.md @@ -1547,3 +1547,21 @@ Released 9th December 2021. - `Config->save()` will no longer write empty data to the file when using JSON and the data fails to encode - an exception will be thrown instead. - `StringToItemParser` now returns the correct items for `bamboo`, `shulker_box`, `stone_slab`, `stone_stairs` and `tall_grass`. - `StringToItemParser` now recognizes `slime` and `slime_block` (these were previously missing). + +# 4.0.2 +Released 12th December 2021. + +## Fixes +### Core +- Fixed server crash when loading written books containing pages with invalid UTF-8 characters - the invalid characters are now scrubbed. +- Fixed server crash when root type of `plugin.yml` is valid, but not an array. +- Fixed ConsoleReader crash due OPcache ASLR issue - it's not clear what caused this, but OPcache is not needed in the subprocess anyway. +- Fixed backslashes getting stripped from unquoted command arguments - these were only supposed to be stripped from quoted arguments, to allow escaping of quotes. +- `build/generate-known-translation-apis.php` now sorts numerically-indexed arguments into ascending order, irrespective of the order they appear in the original string. + +### API +- `KnownTranslationKeys` and `KnownTranslationFactory` are now marked `@internal`. +- `ItemEntity` now clones the itemstack passed to its constructor, fixing various confusing mutability issues. +- `PlayerExperienceChangeEvent->setNewProgress()` now performs range checks. This fixes the root of a very old and confusing crash bug which took several years to identify the cause of. + - Note that the defective plugin(s) which caused this problem will still cause a server crash, but the plugin responsible will now get blamed correctly. +- `GeneratorManager->addGenerator()` now consistently converts the given alias to lowercase. Due to a bug, it previously didn't do this if the `$overwrite` parameter was set to `true`, causing a range of confusing bugs. diff --git a/src/VersionInfo.php b/src/VersionInfo.php index d5cd1d7f1..1d0f10892 100644 --- a/src/VersionInfo.php +++ b/src/VersionInfo.php @@ -32,7 +32,7 @@ use function str_repeat; final class VersionInfo{ public const NAME = "PocketMine-MP"; public const BASE_VERSION = "4.0.2"; - public const IS_DEVELOPMENT_BUILD = true; + public const IS_DEVELOPMENT_BUILD = false; public const BUILD_CHANNEL = "stable"; private function __construct(){