Merge branch 'next-minor' into next-major

This commit is contained in:
Dylan K. Taylor 2023-02-28 19:25:05 +00:00
commit 407b78de3b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
6 changed files with 59 additions and 57 deletions

View File

@ -46,7 +46,7 @@ jobs:
run: echo ::set-output name=NAME::$(echo "${GITHUB_REPOSITORY,,}") run: echo ::set-output name=NAME::$(echo "${GITHUB_REPOSITORY,,}")
- name: Build image for tag - name: Build image for tag
uses: docker/build-push-action@v3.3.0 uses: docker/build-push-action@v4.0.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -59,7 +59,7 @@ jobs:
- name: Build image for major tag - name: Build image for major tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v3.3.0 uses: docker/build-push-action@v4.0.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -72,7 +72,7 @@ jobs:
- name: Build image for minor tag - name: Build image for minor tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v3.3.0 uses: docker/build-push-action@v4.0.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -85,7 +85,7 @@ jobs:
- name: Build image for latest tag - name: Build image for latest tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v3.3.0 uses: docker/build-push-action@v4.0.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp

View File

@ -20,3 +20,12 @@ Released 21st February 2023.
- Fixed dropped items not despawning when in non-ticking chunks. - Fixed dropped items not despawning when in non-ticking chunks.
- Fixed dropped items not despawning if an infinite pickup delay is set. - Fixed dropped items not despawning if an infinite pickup delay is set.
- Fixed infinite despawn delay (never despawn) being ignored for dropped items. - Fixed infinite despawn delay (never despawn) being ignored for dropped items.
# 4.15.2
Released 24th February 2023.
## General
- Accept Minecraft: Bedrock Edition 1.19.63 (identical protocol to 1.19.62, but different version due to Mojang mixup).
## Fixes
- Fixed `World Population` timer sometimes not being stopped, causing strange results in timings reports.

View File

@ -55,7 +55,7 @@
"symfony/filesystem": "^5.4" "symfony/filesystem": "^5.4"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "1.9.18", "phpstan/phpstan": "1.10.3",
"phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.0", "phpstan/phpstan-strict-rules": "^1.2.0",
"phpunit/phpunit": "^9.2" "phpunit/phpunit": "^9.2"

81
composer.lock generated
View File

@ -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": "8d4f1e461bcbce908a6a51d3e73f0440", "content-hash": "c17a304e431f339ea8fda7d7976bdfdf",
"packages": [ "packages": [
{ {
"name": "adhocore/json-comment", "name": "adhocore/json-comment",
@ -1086,16 +1086,16 @@
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v5.4.19", "version": "v5.4.21",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
"reference": "648bfaca6a494f3e22378123bcee2894045dc9d8" "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/648bfaca6a494f3e22378123bcee2894045dc9d8", "url": "https://api.github.com/repos/symfony/filesystem/zipball/e75960b1bbfd2b8c9e483e0d74811d555ca3de9f",
"reference": "648bfaca6a494f3e22378123bcee2894045dc9d8", "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1130,7 +1130,7 @@
"description": "Provides basic utilities for the filesystem", "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/filesystem/tree/v5.4.19" "source": "https://github.com/symfony/filesystem/tree/v5.4.21"
}, },
"funding": [ "funding": [
{ {
@ -1146,7 +1146,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-14T19:14:44+00:00" "time": "2023-02-14T08:03:56+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@ -1775,16 +1775,16 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.9.18", "version": "1.10.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "f2d5cf71be91172a57c649770b73c20ebcffb0bf" "reference": "5419375b5891add97dc74be71e6c1c34baaddf64"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/f2d5cf71be91172a57c649770b73c20ebcffb0bf", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5419375b5891add97dc74be71e6c1c34baaddf64",
"reference": "f2d5cf71be91172a57c649770b73c20ebcffb0bf", "reference": "5419375b5891add97dc74be71e6c1c34baaddf64",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1814,7 +1814,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/phpstan/phpstan/issues", "issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/1.9.18" "source": "https://github.com/phpstan/phpstan/tree/1.10.3"
}, },
"funding": [ "funding": [
{ {
@ -1830,25 +1830,25 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-02-17T15:01:27+00:00" "time": "2023-02-25T14:47:13+00:00"
}, },
{ {
"name": "phpstan/phpstan-phpunit", "name": "phpstan/phpstan-phpunit",
"version": "1.3.4", "version": "1.3.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan-phpunit.git", "url": "https://github.com/phpstan/phpstan-phpunit.git",
"reference": "d77af96c1aaec28f7c0293677132eaaad079e01b" "reference": "34ee324a2b8fcab680fbb3f3f3d6c86389df35ba"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d77af96c1aaec28f7c0293677132eaaad079e01b", "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/34ee324a2b8fcab680fbb3f3f3d6c86389df35ba",
"reference": "d77af96c1aaec28f7c0293677132eaaad079e01b", "reference": "34ee324a2b8fcab680fbb3f3f3d6c86389df35ba",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2 || ^8.0", "php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.9.3" "phpstan/phpstan": "^1.10"
}, },
"conflict": { "conflict": {
"phpunit/phpunit": "<7.0" "phpunit/phpunit": "<7.0"
@ -1880,31 +1880,32 @@
"description": "PHPUnit extensions and rules for PHPStan", "description": "PHPUnit extensions and rules for PHPStan",
"support": { "support": {
"issues": "https://github.com/phpstan/phpstan-phpunit/issues", "issues": "https://github.com/phpstan/phpstan-phpunit/issues",
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.4" "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.9"
}, },
"time": "2023-02-09T08:05:29+00:00" "time": "2023-02-28T13:04:23+00:00"
}, },
{ {
"name": "phpstan/phpstan-strict-rules", "name": "phpstan/phpstan-strict-rules",
"version": "1.4.5", "version": "1.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan-strict-rules.git", "url": "https://github.com/phpstan/phpstan-strict-rules.git",
"reference": "361f75b06066f3fdaba87c1f57bdb1ffc28d6f1d" "reference": "b7dd96a5503919a43b3cd06a2dced9d4252492f2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/361f75b06066f3fdaba87c1f57bdb1ffc28d6f1d", "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b7dd96a5503919a43b3cd06a2dced9d4252492f2",
"reference": "361f75b06066f3fdaba87c1f57bdb1ffc28d6f1d", "reference": "b7dd96a5503919a43b3cd06a2dced9d4252492f2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2 || ^8.0", "php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.9.7" "phpstan/phpstan": "^1.10"
}, },
"require-dev": { "require-dev": {
"nikic/php-parser": "^4.13.0", "nikic/php-parser": "^4.13.0",
"php-parallel-lint/php-parallel-lint": "^1.2", "php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5" "phpunit/phpunit": "^9.5"
}, },
@ -1928,29 +1929,29 @@
"description": "Extra strict and opinionated rules for PHPStan", "description": "Extra strict and opinionated rules for PHPStan",
"support": { "support": {
"issues": "https://github.com/phpstan/phpstan-strict-rules/issues", "issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.4.5" "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.0"
}, },
"time": "2023-01-11T14:16:29+00:00" "time": "2023-02-21T10:17:10+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "9.2.24", "version": "9.2.25",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" "reference": "0e2b40518197a8c0d4b08bc34dfff1c99c508954"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0e2b40518197a8c0d4b08bc34dfff1c99c508954",
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", "reference": "0e2b40518197a8c0d4b08bc34dfff1c99c508954",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"nikic/php-parser": "^4.14", "nikic/php-parser": "^4.15",
"php": ">=7.3", "php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3", "phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2", "phpunit/php-text-template": "^2.0.2",
@ -1999,7 +2000,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.25"
}, },
"funding": [ "funding": [
{ {
@ -2007,7 +2008,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-01-26T08:26:55+00:00" "time": "2023-02-25T05:32:00+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -2252,16 +2253,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.6.3", "version": "9.6.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555" "reference": "9125ee085b6d95e78277dc07aa1f46f9e0607b8d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7b1615e3e887d6c719121c6d4a44b0ab9645555", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9125ee085b6d95e78277dc07aa1f46f9e0607b8d",
"reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555", "reference": "9125ee085b6d95e78277dc07aa1f46f9e0607b8d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2334,7 +2335,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.3" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.4"
}, },
"funding": [ "funding": [
{ {
@ -2350,7 +2351,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-02-04T13:37:15+00:00" "time": "2023-02-27T13:06:37+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",

View File

@ -34,7 +34,6 @@ use pocketmine\network\mcpe\JwtUtils;
use pocketmine\network\mcpe\NetworkSession; use pocketmine\network\mcpe\NetworkSession;
use pocketmine\network\mcpe\protocol\LoginPacket; use pocketmine\network\mcpe\protocol\LoginPacket;
use pocketmine\network\mcpe\protocol\PlayStatusPacket; use pocketmine\network\mcpe\protocol\PlayStatusPacket;
use pocketmine\network\mcpe\protocol\ProtocolInfo;
use pocketmine\network\mcpe\protocol\types\login\AuthenticationData; use pocketmine\network\mcpe\protocol\types\login\AuthenticationData;
use pocketmine\network\mcpe\protocol\types\login\ClientData; use pocketmine\network\mcpe\protocol\types\login\ClientData;
use pocketmine\network\mcpe\protocol\types\login\ClientDataToSkinDataHelper; use pocketmine\network\mcpe\protocol\types\login\ClientDataToSkinDataHelper;
@ -64,12 +63,6 @@ class LoginPacketHandler extends PacketHandler{
){} ){}
public function handleLogin(LoginPacket $packet) : bool{ public function handleLogin(LoginPacket $packet) : bool{
if(!$this->isCompatibleProtocol($packet->protocol)){
$this->session->disconnectIncompatibleProtocol($packet->protocol);
return true;
}
$extraData = $this->fetchAuthData($packet->chainDataJwt); $extraData = $this->fetchAuthData($packet->chainDataJwt);
if(!Player::isValidUserName($extraData->displayName)){ if(!Player::isValidUserName($extraData->displayName)){
@ -240,8 +233,4 @@ class LoginPacketHandler extends PacketHandler{
$this->server->getAsyncPool()->submitTask(new ProcessLoginTask($packet->chainDataJwt->chain, $packet->clientDataJwt, $authRequired, $this->authCallback)); $this->server->getAsyncPool()->submitTask(new ProcessLoginTask($packet->chainDataJwt->chain, $packet->clientDataJwt, $authRequired, $this->authCallback));
$this->session->setHandler(null); //drop packets received during login verification $this->session->setHandler(null); //drop packets received during login verification
} }
protected function isCompatibleProtocol(int $protocolVersion) : bool{
return $protocolVersion === ProtocolInfo::CURRENT_PROTOCOL;
}
} }

View File

@ -61,6 +61,9 @@ final class SessionStartPacketHandler extends PacketHandler{
} }
protected function isCompatibleProtocol(int $protocolVersion) : bool{ protected function isCompatibleProtocol(int $protocolVersion) : bool{
return $protocolVersion === ProtocolInfo::CURRENT_PROTOCOL; //TODO: REMOVE THIS
//1.19.63 released with an unchanged protocol, but a bumped protocol version, since they forgot to do it in the
//previous release. Since they are functionally identical, we can accept both.
return $protocolVersion === ProtocolInfo::CURRENT_PROTOCOL || $protocolVersion === 568;
} }
} }