Fixes ACCOUNTS-6A. Force value to string for client token validation

This commit is contained in:
ErickSkrauch 2023-05-26 18:48:15 +02:00
parent 99c983c3ea
commit a1eb5f3be6
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -18,7 +18,7 @@ class ClientTokenValidator extends Validator {
* @throws \api\modules\authserver\exceptions\AuthserverException * @throws \api\modules\authserver\exceptions\AuthserverException
*/ */
protected function validateValue($value): ?array { protected function validateValue($value): ?array {
if (mb_strlen($value) > 255) { if (mb_strlen((string)$value) > 255) {
throw new IllegalArgumentException('clientToken is too long.'); throw new IllegalArgumentException('clientToken is too long.');
} }