Review 12.4 Merged

83833[BUGFIX] Do not log failed HMAC validations for HashService

Stefan Bürk CR +2 V +2 Easy +2 −0 updated 04/16/24, 07:06

Commit message

The new core `HashService` and the deprecated extbase `HashService`
have the function `validateAndStripHmac` to validate and strip a
given HMAC appended string. The function will throw an exception,
if the given string is either too short or the appended HMAC in the
string is not valid.

In context of a TYPO3 extension, those exceptions are usually
thrown, when a given HMAC appended string has been tampered.
Logging those exceptions to sys_log or logfiles make no sense,
since a TYPO3 site owner have no reasonable possibility to
prevent a tampered HMAC appended string being passed to the
`validateAndStripHmac` function.

This change prevents logging of four exceptions caused by potential
manipulated HMAC appended strings.

Additionally, a note has been added to extbase `HashService`, that
exception codes from that class must be removed in v14 in
`AbstractExceptionHandler::IGNORED_HMAC_EXCEPTION_CODES`.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Torben Hansen +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Torben Hansen +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 45

  1. Stefan Bürk uploaded patch set 1 04/16/24, 06:57

  2. Torben Hansen voted on patch set 1 CR +1 V +1 04/16/24, 07:00

  3. core-ci voted on patch set 1 V +1 04/16/24, 07:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56053

  4. Stefan Bürk voted on patch set 1 CR +2 V +2 04/16/24, 07:06

  5. Stefan Bürk merged patch set 2 04/16/24, 07:06