Commit Graph

18 Commits

Author SHA1 Message Date
Dylan K. Taylor
d0d84d4c51 New rule: explode() limit parameter must be set 2025-03-04 20:44:01 +00:00
Dylan K. Taylor
b078e01b65 JwtUtils: handle DER <-> raw signature conversion in-house, drop fgrosse/phpasn1 dependency
normally I would hesitate to reinvent the wheel, but we only need a tiny subset of the ASN.1 spec which is trivial to implement by itself.
I'd rather this than depend on another library that could introduce security vulnerabilities (I'm looking at you, jsonmapper).

closes #5935
2023-07-24 13:36:12 +01:00
Dylan K. Taylor
4e646d19a4 Harden login EC key validation 2023-07-14 11:55:47 +01: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
889d048ca3 Make use of Utils::assumeNotFalse() in a bunch of places
I've stuck to only doing this in the places where I'm sure we should never get false back. Other places I'm less sure of (and I found more bugs along the way).
2021-12-08 19:39:04 +00:00
Dylan K. Taylor
2b5667a56b Move PHP minimum to 8.0 2021-07-26 20:29:39 +01:00
Dylan K. Taylor
09eac0e129 Merge remote-tracking branch 'origin/stable' 2021-07-26 20:14:33 +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
755e53cd71 JwtUtils: added a split() function to reduce code duplication 2020-06-18 12:05:54 +01:00
Dylan K. Taylor
e9ecb9a9fd fixed build failure 2020-05-13 22:54:24 +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
486e0e710b JwtUtils: fix minor formatting issue 2020-05-13 20:51:24 +01:00
Dylan K. Taylor
44a7829536 VerifyLoginException: fixed rogue usage in JwtUtils 2020-05-13 20:50:41 +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
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
a6c35cab9a JwtUtils: fix phpstan failure 2020-05-06 22:00:11 +01:00
Dylan K. Taylor
ed757c7207 consolidate some JWT handling into one class 2020-05-06 21:32:22 +01:00