Review main Merged

71457[BUGFIX] Allow FilePathSanitizer to return absolute paths

Helmut Hummel CR +2 V +2 Normal +125 −31 updated 10/11/21, 14:51

Commit message

There are few cases where the resulting path from FilePathSanitizer
is needed and used as absolute path to a private file.

For these usages the file now is returned early.

Additionally the logic to make a relative path out of
an absolute path is now relaxed a bit, so that legacy
usages of this API won't fail any more.

An exception is still thrown, when a path from Composer
package is requested, that can not be resolved to a public path.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 2

Files 6

Review log 3140

Show 1215 earlier messages
  1. Helmut Hummel uploaded patch set 1 10/06/21, 09:45

  2. Nikita Hovratov commented on patch set 1 10/06/21, 09:57

    RequestHandler.php:244

    Should we add a check, if the file exists? Before it would throw an exception in such a case.
  3. core-ci voted on patch set 1 V +1 10/06/21, 10:08 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17656

  4. Chris Müller commented on patch set 1 10/06/21, 10:09

    RequestHandler.php:244 Reply

    With applied patch and file does not exists I am getting an empty page, no exception. I would instead prefer a thrown exception with a clear message, so as a developer I know what is going on.
  5. Helmut Hummel commented on patch set 1 10/06/21, 10:15

    RequestHandler.php:244 Reply

    I'd rather throw an exception in PageRenderer, which currently silently returns an empty string if template file is not found
  6. Helmut Hummel uploaded patch set 2 10/06/21, 10:19

  7. Helmut Hummel commented on patch set 2 10/06/21, 10:20

    RequestHandler.php:244 Reply

    Done
  8. Chris Müller voted on patch set 2 V +1 CR +1 10/06/21, 10:38

  9. core-ci voted on patch set 2 V -1 10/06/21, 10:43 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17658

  10. Helmut Hummel uploaded patch set 3 10/06/21, 13:41

  11. core-ci voted on patch set 3 V +1 10/06/21, 14:01 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17668

  12. Chris Müller voted on patch set 3 V +1 CR +1 10/06/21, 14:16

  13. Christian Kuhn commented on patch set 3 10/06/21, 16:31

    RequestHandler.php:246

    in case this patch is pushed for a different reason again: please use @todo ... this is easier to grep later.
  14. Nikita Hovratov uploaded patch set 4 10/07/21, 07:20

  15. Nikita Hovratov commented on patch set 4 10/07/21, 07:20

    RequestHandler.php:246 Reply

    Done
  1. core-ci voted on patch set 4 V -1 10/07/21, 07:24 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17717

  2. Nikita Hovratov uploaded patch set 5 10/07/21, 07:34

  3. core-ci voted on patch set 5 V +1 10/07/21, 07:56 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17718

  4. Chris Müller voted on patch set 5 V +1 CR +1 10/07/21, 08:01

  5. Nikita Hovratov voted on patch set 5 V +1 CR +1 10/07/21, 08:08

  6. Benni Mack commented on patch set 5 10/07/21, 10:26

  7. Helmut Hummel commented on patch set 5 CR -1 10/07/21, 13:25

    Benni will comment on this one later
  8. Helmut Hummel uploaded patch set 6 10/08/21, 07:17

  9. Helmut Hummel uploaded patch set 7 10/08/21, 07:18

  10. core-ci voted on patch set 6 V -1 10/08/21, 07:20 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17793

  11. Helmut Hummel commented on patch set 7 10/08/21, 07:25

    RequestHandler.php:244 Reply

    > With applied patch and file does not exists I am getting an empty page, no exception. I would instead prefer a thrown exception with a clear message, so as a developer I know what is going on. In the latest patch set the previous behaviour is restored, where an invalid file will use the default template
  12. core-ci voted on patch set 7 V +1 10/08/21, 07:34 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17794

  13. Georg Ringer voted on patch set 7 V +1 CR +1 10/08/21, 07:47

  14. Helmut Hummel uploaded patch set 8 10/08/21, 07:57

  15. Tymoteusz Motylewski commented on patch set 8 10/08/21, 08:13

    is now relaxed
  16. core-ci voted on patch set 8 V +1 10/08/21, 08:17 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17795

  17. Georg Ringer updated the commit message in patch set 9 10/08/21, 08:17

  18. Georg Ringer voted on patch set 9 V +1 CR +1 10/08/21, 08:17

  19. core-ci voted on patch set 9 V +1 10/08/21, 08:36 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17800

  20. Benni Mack voted on patch set 9 CR +2 10/08/21, 10:56

  21. Helmut Hummel commented on patch set 9 10/08/21, 12:50

    Reply

    Done
  22. Oli Bartsch voted on patch set 9 CR +1 10/11/21, 11:52

  23. Oli Bartsch voted on patch set 9 V +1 10/11/21, 11:59

  24. Benni Mack voted on patch set 9 V +2 10/11/21, 14:51

  25. Benni Mack merged patch set 10 10/11/21, 14:51