35 Commits

Author SHA1 Message Date
Dylan K. Taylor
489a7ba365
Merge branch 'legacy/pm4' into stable 2023-07-14 13:03:14 +01:00
Dylan K. Taylor
2709dd359c
ProcessLoginTask: fixed backport errors 2023-07-14 12:37:50 +01:00
Dylan K. Taylor
4e646d19a4
Harden login EC key validation 2023-07-14 11:55:47 +01:00
Dylan K. Taylor
24b74a96eb
Merge branch 'legacy/pm4' into stable 2023-07-01 11:52:42 +01:00
Dylan K. Taylor
249ef9c534
ProcessLoginTask: remove old key expiry
since we don't have a hard date for this, and I've already made one wrong educated guess, I'd rather not have another massive outage.
A security update will have to be made to remove the old key as soon as the new one is rolled. This is not ideal, but it's the least disruptive option.
2023-07-01 11:41:04 +01:00
Dylan K. Taylor
132330e16f
Merge branch 'legacy/pm4' into stable 2023-06-07 21:08:09 +01:00
Dylan K. Taylor
2538880408
1.20.0 2023-06-07 20:56:59 +01:00
Dylan K. Taylor
222415859a
Require pthreads ^5.1
This version of pthreads has a substantially improved API, improved
performance, improved memory usage, and much less magical and broken
behaviour.
2023-01-23 20:02:33 +00:00
Dylan K. Taylor
f173b91ca1
Introduce support for Translatable disconnection messages
this allows localizing disconnection screens (at least, once #4512 has been addressed) and the disconnect reasons shown on the console.

We already had disconnect messages implicitly localized in a few places, so this is just formalizing it.
This does break BC with any code that previously passed translation keys as the disconnect screen message, because they'll no longer be translated (only Translatables will be translatated now).
2022-12-27 18:36:07 +00:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
df3a69dcb7
Modernize private property declarations in Threaded classes
I previously avoided this due to being unsure of the effects; however, it's clear that we already use typed properties on Threaded things in other places anyway, and the only known issues are with uninit properties, and arrays.
2022-05-17 22:42:18 +01:00
Dylan K. Taylor
be1996752a
Replace disallowed operators in src/network/ 2022-01-20 19:11:32 +00:00
Dylan K. Taylor
aa56c66a3c
ProcessLoginTask: drop usage of no-op method
this is no longer useful since 8.0.
2021-12-16 18:46:34 +00:00
Dylan K. Taylor
039c59856d
Remove % translation prefixes dotted around all over the place 2021-08-15 20:03:38 +01:00
Dylan K. Taylor
f89e10e684
Silence openssl_free_key() deprecation warnings on 8.0
we don't give a shit and these calls are currently needed for 7.4.
2021-07-23 16:30:22 +01:00
Dylan T
0eb4231b51
Use OpenSSL for ECDH during client login, drop mdanter/ecc (#4328)
This brings a significant performance improvement to login sequence handling, reducing CPU cost of `PrepareEncryptionTask` by over 90% and `ProcessLoginTask` by over 60%. It also allows us to shed a dependency.
2021-07-22 23:04:00 +01:00
Dylan K. Taylor
94e16f416d
Added KnownTranslationKeys (generated) and start using it 2021-06-29 22:46:04 +01:00
Dylan K. Taylor
bbae02264d
Merge branch 'stable' 2021-01-27 20:04:13 +00:00
Dylan K. Taylor
82b3e3398b make more use of igbinary_serialize() and igbinary_unserialize() 2020-06-17 23:03:03 +01:00
Dylan K. Taylor
6a8bb89734 Merge commit '11a3f9f1b906d0a73adb5a81a6eff120b56cf6fa'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/network/mcpe/VerifyLoginTask.php
2020-06-17 21:12:27 +01:00
Dylan K. Taylor
8cabab20e3 Merge commit '09771849aefb70bc29202b160f65723cf926c974'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/network/mcpe/VerifyLoginTask.php
2020-06-17 21:10:59 +01:00
Dylan K. Taylor
57908586bd more jsonmapper models for login 2020-06-17 19:10:27 +01:00
Dylan K. Taylor
84291e7980 Throw a more specific exception for JWT handling errors 2020-05-13 21:23:04 +01:00
Dylan K. Taylor
d7eb4f9651 Extract more general-purpose logic to JwtUtils
this code could now be reused for creating custom login packets.
2020-05-13 20:46:01 +01:00
Dylan K. Taylor
161ac468f3 ProcessLoginTask: properly cater for key parsing errors 2020-05-13 19:23:12 +01:00
Dylan K. Taylor
934f85841c asserts 👏 are 👏 not 👏 error 👏 checking 2020-05-13 13:37:49 +01:00
Dylan K. Taylor
8c2878fe5b Added JwtUtils::parse(), make ProcessLoginTask more robust 2020-05-13 13:36:42 +01:00
Dylan K. Taylor
144a66c110 cumulative imports cleanup (again) 2020-05-12 22:38:59 +01:00
Dylan K. Taylor
ed757c7207 consolidate some JWT handling into one class 2020-05-06 21:32:22 +01:00
Dylan K. Taylor
35d656c6e5 ProcessLoginTask no longer depends on NetworkSession 2020-04-22 13:30:37 +01:00
Dylan K. Taylor
83a3adecff LoginPacket: use netresearch/jsonmapper for login data decoding
this makes retrieval static analysis friendly without extra steps.
2020-03-23 22:00:13 +00:00
Dylan K. Taylor
ee36ac9875 ProcessLoginTask: use strict base64_decode() 2020-02-07 22:09:46 +00:00
Dylan K. Taylor
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00:00
Dylan K. Taylor
4651bcf8c3 master: imports cleanup
it was easier to make an empty merge and re-run php-cs-fixer afterwards.
2019-12-11 23:23:03 +00:00
Dylan K. Taylor
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00