Review main Merged

71797[BUGFIX] Do not log page access failures

Markus Klein CR +2 V +2 Easy +3 −7 updated 10/15/21, 19:29

Commit message

It does not make sense to log page access failures
to the logging framework. Pages are inaccessible
for a reason, no need to log every try.
(404 responses are logged by the webserver)

This helps with monitoring and removes useless
log messages from the logs.

Also avoid to respond with an internal server error to
page-requests that are hidden by (inherited) rootline
constraints. These are normalized to 404. These cases
should be improved to differentiate between 404 (hidden
due to rootline) and 403 (access denied due to rootline)
in future.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Torben Hansen +1
    • Christoph Lehmann +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 2935

Show 810 earlier messages
  1. Markus Klein uploaded patch set 1 10/14/21, 19:33

  2. Benni Mack commented on patch set 1 CR -1 10/14/21, 19:39

    $message is still needed a few lines further down
  3. Markus Klein uploaded patch set 2 10/14/21, 19:52

  4. Markus Klein commented on patch set 2 10/14/21, 19:52

    Reply

    gnaaa.... sorry
  5. core-ci voted on patch set 1 V -1 10/14/21, 19:55 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18132

  6. core-ci voted on patch set 2 V +1 10/14/21, 20:09 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18135

  7. Benjamin Franzke voted on patch set 2 V +1 CR +1 10/14/21, 20:20

  8. Christoph Lehmann commented on patch set 2 10/14/21, 20:23

    Thanks for working on this!

    TypoScriptFrontendController.php:1212

    First of all: Thanks for working on this! Can we drop this one too?

    TypoScriptFrontendController.php:2028

    For my understanding this is reasonable too, since one can hide the default language variant of a page.... So drop it?
  9. Markus Klein commented on patch set 2 10/14/21, 20:31

    TypoScriptFrontendController.php:1212 Reply

    Yes, I think this can/should go as well

    TypoScriptFrontendController.php:2028 Reply

    Agree. So the whole logPageAccessFailure() function has 1 usage left then
  10. Benjamin Franzke commented on patch set 2 10/14/21, 20:36

    TypoScriptFrontendController.php:1212 Reply

    Hm, I tend to agree, but it seems this block needs some more refactoring: The error page is generated using internalErrorAction(), seems that should also be changed to accessDeniedAction().

    TypoScriptFrontendController.php:2028 Reply

    Ack, sounds reasonable to me.
  1. Markus Klein commented on patch set 2 10/14/21, 20:43

    TypoScriptFrontendController.php:1212 Reply

    Not sure. accessDenied means 403 status, which indirectly reveals that the requested page indeed exists. But hidden/start/end should actually behave like the page does not exist (404)
  2. Christoph Lehmann commented on patch set 2 10/14/21, 20:45

    TypoScriptFrontendController.php:1212 Reply

    I totally agree with this, it should be a 404 when a page is hidden/start/end
  3. Markus Klein uploaded patch set 3 10/15/21, 07:09

  4. Markus Klein commented on patch set 3 10/15/21, 07:10

    TypoScriptFrontendController.php:1212 Reply

    removed this line

    TypoScriptFrontendController.php:2028 Reply

    Done
  5. Christoph Lehmann voted on patch set 3 V +1 CR +1 10/15/21, 07:12

  6. Benni Mack voted on patch set 3 CR +1 10/15/21, 07:25

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

  8. Benni Mack uploaded patch set 4 10/15/21, 07:53

  9. Benjamin Franzke voted on patch set 4 CR +1 10/15/21, 07:56

  10. Markus Klein commented on patch set 4 CR -1 10/15/21, 07:58

    talking to Benni
  11. Benjamin Franzke voted on patch set 4 V +1 10/15/21, 08:04

  12. core-ci voted on patch set 4 V +1 10/15/21, 08:08 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18145

  13. Benjamin Franzke commented on patch set 4 10/15/21, 08:08

    TypoScriptFrontendController.php:1212 Reply

    > Not sure. accessDenied means 403 status, which indirectly reveals that the requested page indeed exists. But hidden/start/end should actually behave like the page does not exist (404) I agree in general. But I could only trigger this using a "Backend User Section" on the root level. Is the comment > // Checking for include section regarding the hidden/starttime/endtime/fe_user (that is access control of a whole subbranch! correct at all? I mean checkRootlineForIncludeSection doesn't seem to handle hidden/starttime/endtime/fe_user.
  14. Benni Mack commented on patch set 4 10/15/21, 08:13

    TypoScriptFrontendController.php:1212 Reply

    Yes. checkPagerecordForIncludeSection does this for you
  15. Benni Mack commented on patch set 4 10/15/21, 08:19

    let's go back to PS3 and tackle the accessDenied topic separately (probably master-only then)
  16. Benni Mack uploaded patch set 5 10/15/21, 08:19

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

  18. Benjamin Franzke uploaded patch set 6 10/15/21, 10:37

  19. Benjamin Franzke commented on patch set 6 10/15/21, 10:37

    TypoScriptFrontendController.php:1212 Reply

    Let's normalize to pageNotFoundAction for now.
  20. core-ci voted on patch set 6 V +1 10/15/21, 10:50 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18157

  21. Christoph Lehmann voted on patch set 6 CR +1 10/15/21, 11:00

  22. Torben Hansen voted on patch set 6 CR +1 10/15/21, 12:28

  23. Benni Mack voted on patch set 6 V +1 CR +1 10/15/21, 12:50

  24. Benjamin Franzke voted on patch set 6 V +2 CR +2 10/15/21, 19:29

  25. Benjamin Franzke merged patch set 7 10/15/21, 19:29