mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 03:16:35 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
commit
ded7e24f67
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.16]
|
php: [8.0.18]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build and prepare PHP cache
|
- name: Build and prepare PHP cache
|
||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.16]
|
php: [8.0.18]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -69,7 +69,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.16]
|
php: [8.0.18]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -107,7 +107,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.16]
|
php: [8.0.18]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -147,7 +147,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [ubuntu-20.04]
|
image: [ubuntu-20.04]
|
||||||
php: [8.0.16]
|
php: [8.0.18]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -85,3 +85,25 @@ Released 1st April 2022.
|
|||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
- Fixed buffer length underflow crash in `LoginPacket` handling.
|
- Fixed buffer length underflow crash in `LoginPacket` handling.
|
||||||
|
|
||||||
|
# 4.2.7
|
||||||
|
Released 15th April 2022.
|
||||||
|
|
||||||
|
## General
|
||||||
|
- Added lots more documentation (in comments) about the `aliases` section in `pocketmine.yml`. You can read about this feature in the `aliases` section of the [updated `pocketmine.yml` template](/resources/pocketmine.yml).
|
||||||
|
- Improved wording of documentation of `PlayerPreLoginEvent`.
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
- Fixed core server crash when a plugin causes another plugin to be disabled during a scheduled task.
|
||||||
|
- Fixed core server crash when loading a plugin with an abstract main class.
|
||||||
|
- Fixed ghost items in many interaction situations (most notably, using projectiles while looking at an entity or block).
|
||||||
|
- Implemented a workaround for a client teleport bug which led to player positions not updating properly when using ender pearls.
|
||||||
|
- Fixed buggy movement when teleporting the player during `PlayerToggleSneakEvent`, `PlayerToggleSprintEvent`, `PlayerToggleSwimEvent` and `PlayerToggleGlideEvent`.
|
||||||
|
|
||||||
|
# 4.2.8
|
||||||
|
Released 17th April 2022.
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
- Fixed a memory leak in RakLib which could result in a server crash when players stay online for a long time.
|
||||||
|
- Fixed server crash when attempting to load a corrupted empty resource pack.
|
||||||
|
- Fixed users with the same name with differerently cased letters being able to duplicate items (userdata is matched by case-insensitive name).
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
"webmozart/path-util": "^2.3"
|
"webmozart/path-util": "^2.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "1.5.4",
|
"phpstan/phpstan": "1.5.6",
|
||||||
"phpstan/phpstan-phpunit": "^1.1.0",
|
"phpstan/phpstan-phpunit": "^1.1.0",
|
||||||
"phpstan/phpstan-strict-rules": "^1.0.0",
|
"phpstan/phpstan-strict-rules": "^1.0.0",
|
||||||
"phpunit/phpunit": "^9.2"
|
"phpunit/phpunit": "^9.2"
|
||||||
|
40
composer.lock
generated
40
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "7e7da4bafdfc9f2b9bfbb3dc7cda739c",
|
"content-hash": "312b0119034654b3c161ef945b29488e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adhocore/json-comment",
|
"name": "adhocore/json-comment",
|
||||||
@ -727,16 +727,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pocketmine/raklib",
|
"name": "pocketmine/raklib",
|
||||||
"version": "0.14.3",
|
"version": "0.14.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pmmp/RakLib.git",
|
"url": "https://github.com/pmmp/RakLib.git",
|
||||||
"reference": "4798576fec0364266dce23b368a7fec5e5de7927"
|
"reference": "1ea8e3b95a1b6bf785dc27d76578657be4185f42"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/4798576fec0364266dce23b368a7fec5e5de7927",
|
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/1ea8e3b95a1b6bf785dc27d76578657be4185f42",
|
||||||
"reference": "4798576fec0364266dce23b368a7fec5e5de7927",
|
"reference": "1ea8e3b95a1b6bf785dc27d76578657be4185f42",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -748,7 +748,7 @@
|
|||||||
"pocketmine/log": "^0.3.0 || ^0.4.0"
|
"pocketmine/log": "^0.3.0 || ^0.4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "1.3.3",
|
"phpstan/phpstan": "1.5.4",
|
||||||
"phpstan/phpstan-strict-rules": "^1.0"
|
"phpstan/phpstan-strict-rules": "^1.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
@ -764,9 +764,9 @@
|
|||||||
"description": "A RakNet server implementation written in PHP",
|
"description": "A RakNet server implementation written in PHP",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/pmmp/RakLib/issues",
|
"issues": "https://github.com/pmmp/RakLib/issues",
|
||||||
"source": "https://github.com/pmmp/RakLib/tree/0.14.3"
|
"source": "https://github.com/pmmp/RakLib/tree/0.14.4"
|
||||||
},
|
},
|
||||||
"time": "2022-01-10T21:29:48+00:00"
|
"time": "2022-04-17T18:42:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pocketmine/raklib-ipc",
|
"name": "pocketmine/raklib-ipc",
|
||||||
@ -1819,16 +1819,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan",
|
"name": "phpstan/phpstan",
|
||||||
"version": "1.5.4",
|
"version": "1.5.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpstan/phpstan.git",
|
"url": "https://github.com/phpstan/phpstan.git",
|
||||||
"reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b"
|
"reference": "799dd8c2d2c9c704bb55d2078078cb970cf0f6d1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/bbf68cae24f6dc023c607ea0f87da55dd9d55c2b",
|
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/799dd8c2d2c9c704bb55d2078078cb970cf0f6d1",
|
||||||
"reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b",
|
"reference": "799dd8c2d2c9c704bb55d2078078cb970cf0f6d1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1854,7 +1854,7 @@
|
|||||||
"description": "PHPStan - PHP Static Analysis Tool",
|
"description": "PHPStan - PHP Static Analysis Tool",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||||
"source": "https://github.com/phpstan/phpstan/tree/1.5.4"
|
"source": "https://github.com/phpstan/phpstan/tree/1.5.6"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1874,7 +1874,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-04-03T12:39:00+00:00"
|
"time": "2022-04-15T11:13:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan-phpunit",
|
"name": "phpstan/phpstan-phpunit",
|
||||||
@ -2766,16 +2766,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/environment",
|
"name": "sebastian/environment",
|
||||||
"version": "5.1.3",
|
"version": "5.1.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||||
"reference": "388b6ced16caa751030f6a69e588299fa09200ac"
|
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
|
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
|
||||||
"reference": "388b6ced16caa751030f6a69e588299fa09200ac",
|
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2817,7 +2817,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/environment/issues",
|
"issues": "https://github.com/sebastianbergmann/environment/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
|
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -2825,7 +2825,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-09-28T05:52:38+00:00"
|
"time": "2022-04-03T09:37:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/exporter",
|
"name": "sebastian/exporter",
|
||||||
|
@ -132,6 +132,7 @@ use function get_class;
|
|||||||
use function ini_set;
|
use function ini_set;
|
||||||
use function is_array;
|
use function is_array;
|
||||||
use function is_dir;
|
use function is_dir;
|
||||||
|
use function is_object;
|
||||||
use function is_resource;
|
use function is_resource;
|
||||||
use function is_string;
|
use function is_string;
|
||||||
use function json_decode;
|
use function json_decode;
|
||||||
@ -1617,7 +1618,7 @@ class Server{
|
|||||||
"reportPaste" => base64_encode($dump->getEncodedData())
|
"reportPaste" => base64_encode($dump->getEncodedData())
|
||||||
], 10, [], $postUrlError);
|
], 10, [], $postUrlError);
|
||||||
|
|
||||||
if($reply !== null && ($data = json_decode($reply->getBody())) !== null){
|
if($reply !== null && is_object($data = json_decode($reply->getBody()))){
|
||||||
if(isset($data->crashId) && isset($data->crashUrl)){
|
if(isset($data->crashId) && isset($data->crashUrl)){
|
||||||
$reportId = $data->crashId;
|
$reportId = $data->crashId;
|
||||||
$reportUrl = $data->crashUrl;
|
$reportUrl = $data->crashUrl;
|
||||||
|
@ -125,6 +125,7 @@ use function get_class;
|
|||||||
use function in_array;
|
use function in_array;
|
||||||
use function json_encode;
|
use function json_encode;
|
||||||
use function ksort;
|
use function ksort;
|
||||||
|
use function strcasecmp;
|
||||||
use function strlen;
|
use function strlen;
|
||||||
use function strtolower;
|
use function strtolower;
|
||||||
use function substr;
|
use function substr;
|
||||||
@ -635,7 +636,7 @@ class NetworkSession{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$info = $existingSession->getPlayerInfo();
|
$info = $existingSession->getPlayerInfo();
|
||||||
if($info !== null && ($info->getUsername() === $this->info->getUsername() || $info->getUuid()->equals($this->info->getUuid()))){
|
if($info !== null && (strcasecmp($info->getUsername(), $this->info->getUsername()) === 0 || $info->getUuid()->equals($this->info->getUuid()))){
|
||||||
if($kickForXUIDMismatch($info instanceof XboxLivePlayerInfo ? $info->getXuid() : "")){
|
if($kickForXUIDMismatch($info instanceof XboxLivePlayerInfo ? $info->getXuid() : "")){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,13 @@ class ZippedResourcePack implements ResourcePack{
|
|||||||
if(!file_exists($zipPath)){
|
if(!file_exists($zipPath)){
|
||||||
throw new ResourcePackException("File not found");
|
throw new ResourcePackException("File not found");
|
||||||
}
|
}
|
||||||
|
$size = filesize($zipPath);
|
||||||
|
if($size === false){
|
||||||
|
throw new ResourcePackException("Unable to determine size of file");
|
||||||
|
}
|
||||||
|
if($size === 0){
|
||||||
|
throw new ResourcePackException("Empty file, probably corrupted");
|
||||||
|
}
|
||||||
|
|
||||||
$archive = new \ZipArchive();
|
$archive = new \ZipArchive();
|
||||||
if(($openResult = $archive->open($zipPath)) !== true){
|
if(($openResult = $archive->open($zipPath)) !== true){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user