Review main Merged

79061[TASK] Provide path to exception message in PathUtility

Georg Ringer CR +2 V +2 Easy +2 −2 updated 01/27/25, 17:02

Commit message

Providing the checked path to the exception helps to
fix the issue a lot faster.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 2024

  1. Georg Ringer uploaded patch set 1 05/17/23, 05:54

  2. Georg Ringer commented on patch set 1 05/17/23, 05:54

    This change is ready for review.
  3. core-ci voted on patch set 1 V +1 05/17/23, 06:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41882

  4. Benni Mack commented on patch set 1 05/17/23, 08:09

    PathUtility.php:100

    is this showing the full path from the file system?
  5. Georg Ringer commented on patch set 1 05/17/23, 08:17

    no, I had this with a project having as Backend logo something like "/fileadmin/fo/logo.png" which works fine for BE login but failed with system mails because logo could not be retrieved
  6. Markus Klein updated the commit message in patch set 2 V +1 05/17/23, 08:54

  7. core-ci voted on patch set 2 V +1 05/17/23, 09:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41888

  8. Oliver Klee voted on patch set 2 CR +1 05/17/23, 10:05

  9. Stefan Froemken commented on patch set 2 CR -1 05/22/23, 08:24

    PathUtility.php:100

    Start sentence with capital "Given: ". Personally, I would prefer: "Given path: "
  10. Georg Ringer uploaded patch set 3 CR +1 V +1 10/09/23, 18:22

  11. Georg Ringer commented on patch set 2 10/09/23, 18:24

    PathUtility.php:100 Reply

    no, it is e.g.: Given file "EXT:core/Resources/Public/JavaScript/java-script-item-handler.js" is expected to be in public directory, but is not
  12. core-ci voted on patch set 3 V +1 10/09/23, 18:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47617

  13. Stefan Bürk commented on patch set 3 10/09/23, 20:50

    PathUtility.php:100 Reply

    That's not correct Georg. `isExtensionPath()` checks if the $resourcePath starts with 'EXT:', and if not this exception is thrown. That means, this exception now exposes everything provided to $resourcePath in general not starting with an 'EXT:' prefix. And eventually exposes full patchs. getFileAbsFileName() would handle `absolute` paths and checkinbg them to beeing beneath a extension folder. Not sure about that.
  14. Georg Ringer commented on patch set 3 10/10/23, 04:38

    PathUtility.php:100 Reply

    the big question is: in production context, the exception is not shown anyway ... i got no problem with discarding the change
  15. Oliver Hader updated the commit message in patch set 4 V +1 10/18/24, 14:10

  16. Christian Kuhn commented on patch set 4 01/14/25, 15:01

    PathUtility.php:100 Reply

    i brought this change to the attention of the security team today, asking if revealing a 'full path' in an exception message is ok or not.
  17. Christian Kuhn commented on patch set 4 01/27/25, 13:17

    PathUtility.php:100 Reply

    Sec team: "It’s okay, if it’s just in development context - but not exposed in production context." My understanding of the error/exception handling is: Exception messages are not rendered in correctly configured production setups. I'll set this resolved and will push this issue forward.
  18. Christian Kuhn uploaded patch set 5 01/27/25, 13:22

  19. Christian Kuhn commented on patch set 4 CR +1 V +1 01/27/25, 13:22

    PathUtility.php:100 Reply

    rephrased.
  20. Christian Kuhn voted on patch set 5 CR +1 V +1 01/27/25, 13:23

  21. core-ci voted on patch set 5 V +1 01/27/25, 13:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73054

  22. Oliver Klee wrote 01/27/25, 15:24

    Removed reviewer Oliver Klee.
  23. Benni Mack voted on patch set 5 CR +2 V +2 01/27/25, 17:02

  24. Benni Mack merged patch set 6 01/27/25, 17:02