From 4c268acc00a00ee8cef1ff23ec8adfc01dfdfa68 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 14 Apr 2019 17:58:53 +0100 Subject: [PATCH 01/16] Fixed /whitelist on/off permissions, closes #2849 --- src/pocketmine/command/defaults/WhitelistCommand.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/command/defaults/WhitelistCommand.php b/src/pocketmine/command/defaults/WhitelistCommand.php index ddf43866c..c998a9762 100644 --- a/src/pocketmine/command/defaults/WhitelistCommand.php +++ b/src/pocketmine/command/defaults/WhitelistCommand.php @@ -115,8 +115,12 @@ class WhitelistCommand extends VanillaCommand{ return true; } - private function badPerm(CommandSender $sender, string $perm) : bool{ - if(!$sender->hasPermission("pocketmine.command.whitelist.$perm")){ + private function badPerm(CommandSender $sender, string $subcommand) : bool{ + static $map = [ + "on" => "enable", + "off" => "disable" + ]; + if(!$sender->hasPermission("pocketmine.command.whitelist." . ($map[$subcommand] ?? $subcommand))){ $sender->sendMessage($sender->getServer()->getLanguage()->translateString(TextFormat::RED . "%commands.generic.permission")); return true; From 389e7767d1c491dc783a64c8052bc4804801782c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 14 Apr 2019 19:30:28 +0100 Subject: [PATCH 02/16] Sign: apply a very stupid limit on text size this is necessary because of the epidemic of server attacks going around lately. --- src/pocketmine/tile/Sign.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pocketmine/tile/Sign.php b/src/pocketmine/tile/Sign.php index 39b3b550b..5cf3fd8da 100644 --- a/src/pocketmine/tile/Sign.php +++ b/src/pocketmine/tile/Sign.php @@ -36,6 +36,7 @@ use function implode; use function mb_check_encoding; use function mb_scrub; use function sprintf; +use function strlen; class Sign extends Spawnable{ public const TAG_TEXT_BLOB = "Text"; @@ -151,6 +152,14 @@ class Sign extends Spawnable{ }else{ return false; } + $size = 0; + foreach($lines as $line){ + $size += strlen($line); + } + if($size > 1000){ + //trigger kick + IP ban - TODO: on 4.0 this will require a better fix + throw new \UnexpectedValueException($player->getName() . " tried to write $size bytes of text onto a sign (bigger than max 1000)"); + } $removeFormat = $player->getRemoveFormat(); From 5ea448ef36c62c5dbc3fe5955e21bfc83b9579ee Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 21 Jun 2018 22:15:50 +0100 Subject: [PATCH 03/16] Add ExamplePlugin to README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42fcfbcd9..59ef84bf6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,8 @@ There are a very wide range of already-written plugins available which you can u ### For developers * [Latest API documentation](https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/) - Doxygen documentation generated from development - * [DevTools](https://github.com/pmmp/PocketMine-DevTools/) - A development tools plugin for creating plugins. + * [DevTools](https://github.com/pmmp/PocketMine-DevTools/) - Development tools plugin for creating plugins + * [ExamplePlugin](https://github.com/pmmp/ExamplePlugin/) - Example plugin demonstrating some basic API features ### Can I contribute? Yes you can! Contributions are welcomed provided that they comply with our [Contributing Guidelines](CONTRIBUTING.md). Please ensure you read the relevant sections of the guidelines carefully before making a Pull Request or opening an Issue. From 86108e7010510cf75294c8ca57aca9146cc87b0a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 11 Aug 2018 15:22:58 +0100 Subject: [PATCH 04/16] Added donation methods --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 59ef84bf6..15e616927 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,12 @@ Yes you can! Contributions are welcomed provided that they comply with our [Cont **Note: Please avoid development builds unless there is no other alternative for what you need.** Development builds are subject to changes at any time without notice, and it is likely that your server or plugins might break without warning. +### Donate +Donations help support the development of the project and pay for our expenses. +- Bitcoin Cash (BCH): `qz9p8dqkv0r7aahdatu5uewqfkvstrglv58f8yle07` +- Bitcoin (BTC): `1PVAyDJ2g7kcjCxAC3C89oxpV2ZYcLad8T` +- [Patreon](https://www.patreon.com/pocketminemp) + ## Licensing information This program is free software: you can redistribute it and/or modify From 0f268df2e06c1b84d9880caa88105c1768e27f5f Mon Sep 17 00:00:00 2001 From: Dylan T Date: Sat, 22 Dec 2018 11:24:04 +0000 Subject: [PATCH 05/16] Add community Discord to Discussion section --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 15e616927..c35024737 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ If you don't find what you're looking for there, [talk to a human](#discussion). ### Discussion - [Forums](https://forums.pmmp.io/) +- [Community Discord](https://discord.gg/bge7dYQ) ### Plugins There are a very wide range of already-written plugins available which you can use to customise your server. Check out [Poggit](https://poggit.pmmp.io), or just search GitHub. From 8f1f5fde47cc6ab7c26dd9a841cbbee4cb7f77e3 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 27 Jul 2018 12:27:29 +0100 Subject: [PATCH 06/16] Security vulnerability reporting for dummies --- .github/ISSUE_TEMPLATE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e23b3d3af..09d826a78 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -4,6 +4,9 @@ THIS ISSUE TRACKER IS FOR BUG REPORTING, NOT FOR HELP & SUPPORT. If you need hel - http://pmmp.readthedocs.io/en/rtfd/ - Documentation - https://forums.pmmp.io - PMMP Forums +PLEASE DO NOT REPORT ATTACK VECTORS ON THIS ISSUE TRACKER. +Send an email to team@pmmp.io if you have a vulnerability to report. + Any issues requesting updates to new versions of MCPE will be treated as spam. Please do not create issues for missing/un-implemented gameplay features - they will be closed. --> From c410e676b32049ac95f7982ff4a5b9681bd12adb Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 3 Aug 2018 09:02:53 +0100 Subject: [PATCH 07/16] Update ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 09d826a78..b2d513eae 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -8,6 +8,8 @@ PLEASE DO NOT REPORT ATTACK VECTORS ON THIS ISSUE TRACKER. Send an email to team@pmmp.io if you have a vulnerability to report. Any issues requesting updates to new versions of MCPE will be treated as spam. + +Missing gameplay features are to be expected. Please do not create issues for missing/un-implemented gameplay features - they will be closed. --> From 0a884aa5fbc19f36abfabc9717ead03f5aae9a5d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 18 Aug 2018 13:22:53 +0100 Subject: [PATCH 08/16] Support bot: Be a little less rude --- .github/support.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/support.yml b/.github/support.yml index cb869d76e..1fab0ebcc 100644 --- a/.github/support.yml +++ b/.github/support.yml @@ -5,7 +5,8 @@ supportLabel: "Support request" # Comment to post on issues marked as support requests. Add a link # to a support page, or set to `false` to disable supportComment: > - This issue tracker is not a support forum. Please use the [forums](https://forums.pmmp.io) for support. + Thanks, but this issue tracker is intended for bugs reports only, not for support requests. Please use the [forums](https://forums.pmmp.io) for support requests. + Please read the guidelines on [submitting an issue](https://github.com/pmmp/PocketMine-MP/blob/master/CONTRIBUTING.md#creating-an-issue) before opening any further issues. # Whether to close issues marked as support requests close: true # Whether to lock issues marked as support requests From d1e803685a2af5c7ac10cb1004dd7ecc1eb98fb1 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 21 Oct 2018 15:23:06 +0100 Subject: [PATCH 09/16] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..d3f95d40b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,59 @@ +--- +name: Bug report +about: Report a bug in PocketMine-MP (not plugins) + +--- + +### Issue description + + + + + +- Expected result: What were you expecting to happen? +- Actual result: What actually happened? + +### Steps to reproduce the issue + +1. ... +2. ... + +### OS and versions + +* PocketMine-MP: +* PHP: +* Server OS: +* Game version: PE/Win10 (delete as appropriate) + +### Plugins +- Test on a clean server without plugins: is the issue reproducible without any plugins loaded? + +If the issue is **not** reproducible without plugins: +- Have you asked for help on our forums before creating an issue? +- Can you provide sample, *minimal* reproducing code for the issue? If so, paste it in the bottom section +- Paste your list of plugins here (use the 'plugins' command in PocketMine-MP) + +### Crashdump, backtrace or other files +- Do not paste crashdumps into an issue - please use our Crash Archive at https://crash.pmmp.io for submitting crash reports to not spam the issue tracker. Add links to your reports in the Crash Archive here. +- Please use gist or anything else to add other files and add links here + +* ... From 76a86e51f7e8e4e8b164bb31a9f3d00cabd0f1d6 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 21 Oct 2018 15:23:46 +0100 Subject: [PATCH 10/16] Remove legacy issue template --- .github/ISSUE_TEMPLATE.md | 53 --------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index b2d513eae..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,53 +0,0 @@ -### Issue description - - - - - -- Expected result: What were you expecting to happen? -- Actual result: What actually happened? - -### Steps to reproduce the issue - -1. ... -2. ... - -### OS and versions - -* PocketMine-MP: -* PHP: -* Server OS: -* Game version: PE/Win10 (delete as appropriate) - -### Plugins -- Test on a clean server without plugins: is the issue reproducible without any plugins loaded? - -If the issue is **not** reproducible without plugins: -- Have you asked for help on our forums before creating an issue? -- Can you provide sample, *minimal* reproducing code for the issue? If so, paste it in the bottom section -- Paste your list of plugins here (use the 'plugins' command in PocketMine-MP) - -### Crashdump, backtrace or other files -- Do not paste crashdumps into an issue - please use our Crash Archive at https://crash.pmmp.io for submitting crash reports to not spam the issue tracker. Add links to your reports in the Crash Archive here. -- Please use gist or anything else to add other files and add links here - -* ... From 82bf5f619309d8dc1d10efeea96d109ab632a45e Mon Sep 17 00:00:00 2001 From: Dylan T Date: Sun, 30 Dec 2018 17:19:25 +0000 Subject: [PATCH 11/16] Add Discord link to issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d3f95d40b..590a70dac 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -9,6 +9,7 @@ about: Report a bug in PocketMine-MP (not plugins) THIS ISSUE TRACKER IS FOR BUG REPORTING, NOT FOR HELP & SUPPORT. If you need help, use the links below. - http://pmmp.readthedocs.io/en/rtfd/ - Documentation - https://forums.pmmp.io - PMMP Forums +- https://discord.gg/bge7dYQ - Community Discord PLEASE DO NOT REPORT ATTACK VECTORS ON THIS ISSUE TRACKER. Send an email to team@pmmp.io if you have a vulnerability to report. From 8e1d1993c519511dd08cf67beabd6fd06914b130 Mon Sep 17 00:00:00 2001 From: Dylan T Date: Thu, 3 Jan 2019 00:01:20 +0000 Subject: [PATCH 12/16] Update support.yml --- .github/support.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/support.yml b/.github/support.yml index 1fab0ebcc..608966cb1 100644 --- a/.github/support.yml +++ b/.github/support.yml @@ -5,8 +5,11 @@ supportLabel: "Support request" # Comment to post on issues marked as support requests. Add a link # to a support page, or set to `false` to disable supportComment: > - Thanks, but this issue tracker is intended for bugs reports only, not for support requests. Please use the [forums](https://forums.pmmp.io) for support requests. - Please read the guidelines on [submitting an issue](https://github.com/pmmp/PocketMine-MP/blob/master/CONTRIBUTING.md#creating-an-issue) before opening any further issues. + Thanks, but this issue tracker not intended for support requests. Please read the guidelines on [submitting an issue](https://github.com/pmmp/PocketMine-MP/blob/master/CONTRIBUTING.md#creating-an-issue). + + + [Docs](https://pmmp.rtfd.io) | [Discord](https://discord.gg/bge7dYQ) | [Forums](https://forums.pmmp.io) + # Whether to close issues marked as support requests close: true # Whether to lock issues marked as support requests From 8114551600dc6c4ed7a14191252bee7409889cdc Mon Sep 17 00:00:00 2001 From: Dylan T Date: Thu, 3 Jan 2019 16:32:21 +0000 Subject: [PATCH 13/16] add a Crash issue template valid crashdumps are usually self explanatory and include all required information like OS/version/etc, so there's no need to force reporters to rewrite a bunch of extra information that should already be in the crashdump. --- .github/ISSUE_TEMPLATE/bug_report.md | 3 +++ .github/ISSUE_TEMPLATE/crash.md | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/crash.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 590a70dac..83b9270c8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,9 @@ --- name: Bug report about: Report a bug in PocketMine-MP (not plugins) +title: '' +labels: '' +assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/crash.md b/.github/ISSUE_TEMPLATE/crash.md new file mode 100644 index 000000000..7bcf5f4c2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/crash.md @@ -0,0 +1,15 @@ +--- +name: Crash +about: Report a crash in PocketMine-MP (not plugins) +title: Server crashed +labels: '' +assignees: '' + +--- + + + +Link to crashdump: + + +### Additional comments (optional) From eab2d4d704365c46a9bcba71457772f0bf7496ff Mon Sep 17 00:00:00 2001 From: Dylan T Date: Thu, 3 Jan 2019 16:37:48 +0000 Subject: [PATCH 14/16] Add a Support issue template maybe this will guide people who don't read into shooting themselves in the foot automatically >:) --- .github/ISSUE_TEMPLATE/help---support.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/help---support.md diff --git a/.github/ISSUE_TEMPLATE/help---support.md b/.github/ISSUE_TEMPLATE/help---support.md new file mode 100644 index 000000000..7c370b2d3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/help---support.md @@ -0,0 +1,14 @@ +--- +name: Help & support +about: Help & support +title: '' +labels: Support request +assignees: '' + +--- + +We don't accept support requests on the issue tracker. Please try the following links instead: + +Documentation: http://pmmp.rtfd.io +Forums: https://forums.pmmp.io +Discord: https://discord.gg/bge7dYQ From d6b596a8ac642c68ea436a3203e1b018ffb64548 Mon Sep 17 00:00:00 2001 From: Dylan T Date: Mon, 7 Jan 2019 00:59:16 +0000 Subject: [PATCH 15/16] moar issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 47 ++++--------------- .github/ISSUE_TEMPLATE/help---support.md | 2 +- .../security-dos-vulnerability.md | 12 +++++ 3 files changed, 23 insertions(+), 38 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/security-dos-vulnerability.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 83b9270c8..99a016aef 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Report a bug in PocketMine-MP (not plugins) +about: Unexpected non-crash behaviour (except missing gameplay features) title: '' labels: '' assignees: '' @@ -8,56 +8,29 @@ assignees: '' --- ### Issue description - - - - - - Expected result: What were you expecting to happen? - Actual result: What actually happened? ### Steps to reproduce the issue - 1. ... 2. ... ### OS and versions - -* PocketMine-MP: + +* PocketMine-MP: * PHP: * Server OS: * Game version: PE/Win10 (delete as appropriate) ### Plugins -- Test on a clean server without plugins: is the issue reproducible without any plugins loaded? + -If the issue is **not** reproducible without plugins: -- Have you asked for help on our forums before creating an issue? -- Can you provide sample, *minimal* reproducing code for the issue? If so, paste it in the bottom section -- Paste your list of plugins here (use the 'plugins' command in PocketMine-MP) +- If you remove all plugins, does the issue still occur? +- If the issue is **not** reproducible without plugins: + - Have you asked for help on our forums before creating an issue? + - Can you provide sample, *minimal* reproducing code for the issue? If so, paste it in the bottom section ### Crashdump, backtrace or other files -- Do not paste crashdumps into an issue - please use our Crash Archive at https://crash.pmmp.io for submitting crash reports to not spam the issue tracker. Add links to your reports in the Crash Archive here. -- Please use gist or anything else to add other files and add links here - -* ... + + diff --git a/.github/ISSUE_TEMPLATE/help---support.md b/.github/ISSUE_TEMPLATE/help---support.md index 7c370b2d3..a724460a6 100644 --- a/.github/ISSUE_TEMPLATE/help---support.md +++ b/.github/ISSUE_TEMPLATE/help---support.md @@ -1,6 +1,6 @@ --- name: Help & support -about: Help & support +about: We don't accept support requests here. Try the links on the README. title: '' labels: Support request assignees: '' diff --git a/.github/ISSUE_TEMPLATE/security-dos-vulnerability.md b/.github/ISSUE_TEMPLATE/security-dos-vulnerability.md new file mode 100644 index 000000000..c39833685 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/security-dos-vulnerability.md @@ -0,0 +1,12 @@ +--- +name: Security/DoS vulnerability +about: 'Bug or exploit that can be used to attack servers (hint: don''t report it + on a public issue tracker)' +title: '' +labels: 'Auto: Spam' +assignees: '' + +--- + +Please DO NOT report security vulnerabilities here. +Instead, send an email to team@pmmp.io or contact a developer directly, IN PRIVATE. From 948b0b4cbc91f040b6934abc5fcad06c35a199aa Mon Sep 17 00:00:00 2001 From: Dylan T Date: Wed, 16 Jan 2019 19:21:37 +0000 Subject: [PATCH 16/16] Add an API change request template --- .github/ISSUE_TEMPLATE/api-change-request.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/api-change-request.md diff --git a/.github/ISSUE_TEMPLATE/api-change-request.md b/.github/ISSUE_TEMPLATE/api-change-request.md new file mode 100644 index 000000000..615ab12ef --- /dev/null +++ b/.github/ISSUE_TEMPLATE/api-change-request.md @@ -0,0 +1,19 @@ +--- +name: API change request +about: Suggest a change, addition or removal to the plugin API +title: '' +labels: '' +assignees: '' + +--- + + +## Description + + + +## Justification + + + +## Alternative methods