Review main Merged

76006[BUGFIX] Ensure proper error_reporting reset in JwtTrait workaround

Stefan Bürk CR +2 V +2 Easy +16 −8 updated 10/08/22, 15:42

Commit message

With the introduction of CSRF-like request tokens in #97305 a
3rd party dependency has been added with a PHP8.2 deprecation.
To mitigate this, a workaround has been added to set and reset
the error level in the implementation in JwtTrait.

However, if the called methods throw exception on invalid tokens
the reset has been left out, leaving the `error_reporting` in a
changed state and thus changing the system.

This can be verified using:

> Build/Scripts/runTests.sh -s unitRandom -p 8.2 -o 1665191152

This change wraps the method calls in try-catch blocks and
ensure the error_reporting is properly reset before re-throw
the exception to keep the exception handling workflow intact.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oliver Klee +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 68

  1. Stefan Bürk uploaded patch set 1 10/08/22, 12:03

  2. core-ci voted on patch set 1 V +1 10/08/22, 12:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32098

  3. Christian Kuhn updated the commit message in patch set 2 10/08/22, 12:32

  4. Christian Kuhn voted on patch set 2 V +1 CR +1 10/08/22, 12:33

  5. core-ci voted on patch set 2 V +1 10/08/22, 12:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32101

  6. Oliver Klee voted on patch set 2 CR +1 10/08/22, 12:41

  7. Benjamin Franzke voted on patch set 2 V +2 CR +2 10/08/22, 15:42

  8. Benjamin Franzke merged patch set 3 10/08/22, 15:42