Issue Bug Resolved

#111274FileDumpController throws TypeError for array-valued token parameter

Sebastian Michaelsen 10/29/26, 08:29 updated 11/02/26, 17:35

Description

If a request to the dumpFile eID passes token as an array, it ends in an uncaught TypeError (HTTP 500) instead of a 403:

https://example.org/?eID=dumpFile&t=f&f=1&token[]=x

TypeError: hash_equals(): Argument #2 ($user_string) must be of type string, array given in typo3/sysext/core/Classes/Controller/FileDumpController.php

FileDumpController::isTokenValid() passes the query parameter on without checking its type:

return hash_equals(
    $this->hashService->hmac(implode('|', $parameters), 'resourceStorageDumpFile', HashAlgo::SHA3_256),
    $request->getQueryParams()['token'] ?? ''
);

The file declares strict_types=1, so the array isn’t coerced and hash_equals() throws. These requests come from vulnerability scanners and are not a security issue in themselves. But every one of them reaches the exception handler and is logged as an error, which buries real problems in the production log.

Steps to reproduce:

  1. Request /?eID=dumpFile&t=f&f=1&token[]=x on any frontend.
  2. The response is a 500 and the log shows the TypeError above.

Expected: a 403 response, the same as for any other invalid token, with no error logged.

Verified on: TYPO3 14.3.10. The same code is on main.

Reviews 2

History 27

  1. Sebastian Michaelsen commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-02T17:35:15+00:00" > 11/02/26, 17:35 </span>

    Applied in changeset commit:c1bd1373ac43c6573fd48ecdcbdbbc8fdb38e21f.