Review main Merged

65752[FEATURE] X-Redirect-By Header for pages with redirect types

Georg Ringer CR +2 V +2 Normal +77 −3 updated 09/23/20, 07:18

Commit message

To make debugging easier and to be in sync with redirects by
EXT:redirects, page doktypes which trigger a redirect now also
provide the header X-Redirect-By.

Review

  • Code review CR +2 Done
    • Richard Haeser +2
    • Josef Glatz +1
    • Oli Bartsch +1
  • Verified V +2 Done
    • Richard Haeser +2
    • Josef Glatz +1
    • Oli Bartsch +1
    • TYPO3com +1 CI

Issues 1

Files 5

Review log 2630

Show 45 earlier messages
  1. Georg Ringer uploaded patch set 1 09/17/20, 17:50

  2. Georg Ringer commented on patch set 1 09/17/20, 17:51

    This change is ready for review.
  3. Josef Glatz commented on patch set 1 09/17/20, 18:03

    I really like the idea! However, can it lead to some insights someone can use for attacks? (when knowing ID's) Just a thought
  4. TYPO3com voted on patch set 1 V -1 09/17/20, 18:07 Completed build in 16m 16s on Thu, 17 Sep, 06:06 PM Test Summary: 9 of 73760 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5687

  5. Georg Ringer uploaded patch set 2 09/17/20, 18:23

  1. TYPO3com voted on patch set 2 V +1 09/17/20, 18:39 Completed build in 16m 04s on Thu, 17 Sep, 06:39 PM Test Summary: 73275 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5691

  2. Oli Bartsch commented on patch set 2 V -1 09/17/20, 20:47

    Exposing such information must be at least configurable for integrators.
  3. Georg Ringer commented on patch set 2 09/17/20, 21:01

    > Exposing such information must be at least configurable for integrators. so what is the difference to redirects?
  4. Oli Bartsch commented on patch set 2 09/17/20, 21:29

    > Patch Set 2: > > > Exposing such information must be at least configurable for integrators. > > so what is the difference to redirects? None, the same applies there although no page id is exposed in that case. Adding a general setting for those headers would be reasonable IMO. Or using already existing config like debug.
  5. Oliver Hader commented on patch set 2 09/18/20, 06:53

    From my point of view, it would be okay to expose the component that is causing the redirect - but not the specific internals like page-id. * X-Redirected-By: TYPO3/redirects * X-Redirected-By: TYPO3/pages (there should be a good schema for that since other extensions might make use of that) And yes, the behavior should be configurable since it's a debug(!) header - see the following as references for Wordpress/Yoest: * https://wordpress.stackexchange.com/questions/368594/disabling-the-x-redirect-by-response-header * https://wordpress.org/support/topic/x-redirect-by-wordpress/
  6. Oliver Hader voted on patch set 2 CR -1 09/18/20, 06:54

  7. Richard Haeser commented on patch set 2 09/18/20, 09:16

    Just my opinion: - Always add the x-redirect-by header when doing a redirect and tell by which module / extension - When you have enabled it, expose more detailed information. Having the setting in (Local|Additional)Configuration or in TypoScript both works for me and I do not have a really strong preference on that.
  8. Helmut Hummel commented on patch set 2 09/18/20, 20:00

    How about logging the information instead of exposing it via http? That way we have it configurable out of the box. Additionally a tiny extension with a dedicated logger and a middleware could expose it into http if wanted
  9. Georg Ringer uploaded patch set 3 09/22/20, 08:57

  10. Benni Mack commented on patch set 3 09/22/20, 11:49

    I think having such a toggle is good, however, I suggest we use the same toggle for EXT:redirects as well!
  11. Georg Ringer commented on patch set 3 09/22/20, 12:29

    > I think having such a toggle is good, however, I suggest we use the same toggle for EXT:redirects as well! I would use the same toggle for redirects and backport that to 10 with a breaking change rst if this is ok - but different issue
  12. Benni Mack voted on patch set 3 V +1 CR +1 09/22/20, 16:01

  13. Oli Bartsch voted on patch set 3 V +1 CR +1 09/22/20, 16:46

  14. Richard Haeser voted on patch set 3 CR +1 09/22/20, 16:48

  15. Daniel Goerz commented on patch set 3 CR -1 09/23/20, 06:27

    Don't like the wording. "Shortcut/Mountpoint of page with ID 1" does sound odd. Also, Helmuts suggestion of just logging it seems reasonable to me, but I am fine with this approach, too. Will rephrase, though.
  16. Daniel Goerz uploaded patch set 4 09/23/20, 06:41

  17. Josef Glatz commented on patch set 4 09/23/20, 06:42

    DefaultConfigurationDescription.yaml:539

    intended?
  18. Daniel Goerz uploaded patch set 5 09/23/20, 06:43

  19. Daniel Goerz commented on patch set 5 09/23/20, 06:43

    DefaultConfigurationDescription.yaml:539 Reply

    I forgot to add the sentence, man you are quick :)
  20. Josef Glatz commented on patch set 5 V +1 CR +1 09/23/20, 06:45

    DefaultConfigurationDescription.yaml:539 Reply

    Done
  21. TYPO3com voted on patch set 4 V +1 09/23/20, 06:55 Completed build in 14m 30s on Wed, 23 Sep, 06:55 AM Test Summary: 73676 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5840

  22. Oli Bartsch voted on patch set 5 V +1 CR +1 09/23/20, 06:58

  23. TYPO3com voted on patch set 5 V +1 09/23/20, 07:00 Completed build in 14m 29s on Wed, 23 Sep, 07:00 AM Test Summary: 73676 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5841

  24. Richard Haeser voted on patch set 5 V +2 CR +2 09/23/20, 07:18

  25. Richard Haeser merged patch set 6 09/23/20, 07:18