Review main Abandoned

10281[FEATURE] Wrong HTTP headers when trying to access protected pages

Ingo Renner CR 0 V 0 Easy +18 −1 updated 12/14/14, 16:07

Commit message

When trying to access a login protected page while not being logged in
it may happen that a wrong header is sent.
The install tool allows to set a header for the page not found
handling: [FE][pageNotFound_handling_statheader]
The default value for this setting is "HTTP/1.0 404 Not Found"
In a case where access is denied because the user is not logged in,
this is the wrong header, it should be 403 instead. Therefore this patch
implements a new configuration [FE][pageForbidden_handling_statheader]

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 30

Show 5 earlier messages
  1. Ingo Renner uploaded patch set 2 05/27/13, 17:19

  2. Ingo Renner commented on patch set 2 05/27/13, 17:19

    true, didn't consider that
  3. Tolleiv Nietsch commented on patch set 2 05/27/13, 17:19

    Hm that's a bit fuzzy - the patch works as intended but TYPO3 would show the 404 error page with an 401 HTTP header ... that's imho fine for 4.7 but for 6.0 we should maybe distinguish 404-pages and 401 pages?
  4. Sascha Egerer uploaded patch set 3 05/27/13, 17:19

  5. Sascha Egerer commented on patch set 3 05/27/13, 17:19

    Verified; Looks good to me, but someone else must approve Just moved the variable assignment together
  1. Ingo Renner commented on patch set 4 05/27/13, 17:19

    don't know why it says it depends on it, because it actually doesn't...
  2. Ingo Renner commented on patch set 4 05/27/13, 17:19

    AFAIR I talked to Helmut about it and he was fine with it, trying to get him to have an eye on this...
  3. Sascha Egerer commented on patch set 4 05/27/13, 17:19

    Verified; Looks good to me, but someone else must approve
  4. Sascha Egerer uploaded patch set 4 05/27/13, 17:19

  5. Dmitry Dulepov commented on patch set 4 05/27/13, 17:19

    I'll post to security list and ask people to look here.
  6. Dmitry Dulepov commented on patch set 4 05/27/13, 17:19

    I would prefer that you didn't submit this Please, consult the security team first. Sending 401 will reveal that such page exists, which is information give away and may not be desirable at all (security issue).
  7. Stefan Neufeind commented on patch set 4 05/27/13, 17:19

    Looks good to me, but someone else must approve I wonder if the dependency of this patch as shown in gerrit (other one was abandoned?) might give a problem when merging. The patch looks okay though.
  8. Oliver Klee commented on patch set 2 05/27/13, 17:19

    Looks good to me, but someone else must approve
  9. Helmut Hummel commented on patch set 4 05/27/13, 17:19

    I would prefer that you didn't submit this I don't see a security issue here. However I don't like the implementation. It hardcodes the 404 and 401 header resulting in not respecting the configuration [FE][pageNotFound_handling_statheader] any more. If we want to implement something like this, we would need a new [FE][pageNotAccessible_handling_statheader] configuration. Then we could discuss the default value of this setting. I would be fine with 401 by default, still giving the opportunity for special cases to set it to 404 or even 418
  10. Philipp Gampe commented on patch set 4 05/27/13, 17:19

    Verified; Looks good to me, but someone else must approve

    class.tslib_fe.php:890

    In case of another patchset, please replace this tab by a single space.
  11. Philipp Gampe commented on patch set 4 05/27/13, 17:19

    AFAIK this happens if somebody does not clear the changeid before pushing to another branch or gerrit is confused by the same commit pointers in both branches. Rebasing the local change should help.
  12. Felix Kopp commented on patch set 4 05/27/13, 17:19

    Looks good to me, but someone else must approve
  13. Mr. Jenkins commented on patch set 3 05/27/13, 17:19

  14. Mr. Jenkins commented on patch set 4 05/27/13, 17:19

  15. Nicole Hummel uploaded patch set 5 08/27/13, 00:23

  16. Mr. Jenkins commented on patch set 5 08/27/13, 00:24

  17. Nicole Hummel commented on patch set 5 08/27/13, 00:25

    I refactored this patch for the current master. As a new configuration setting is introduced this is more a feature than a bugfix
  18. Christian Kuhn voted on patch set 5 V +1 CR +1 08/27/13, 09:24

  19. Ernesto Baschny commented on patch set 5 CR -1 08/27/13, 20:03

    We need a pageForbidden_handling just as we also have pageNotFound_handling and pageUnavailable_handling, else it is not consistent with the other settings.

    DefaultConfiguration.php:607

    We need a pageForbidden_handling just as we also have pageNotFound_handling and pageUnavailable_handling, else it is not consistent with the other settings.

    TypoScriptFrontendController.php:1855

    We need a "Page Forbidden Handler" for this, as we should not re-use the same "pageNotFound" handling, as the error message is a different one.
  20. Stefan Neufeind commented on patch set 5 10/17/13, 11:25

    Needs an update. Please consider Ernesto's comment regarding the pageNotFound_handling. (I'm still a bit undecided about that ...)
  21. Martin Kutschker commented on patch set 5 07/21/14, 08:17

    While the page-not-found-handler is a bit ill-named I don't think we should introduce a new handler for page-forbidden. Why? The existing page-not-found-handler is triggered also for page-not-available-for-requested.language , page-has-expired, etc. I don't think I'd like a handler for every possible error condition. Better provide the handler with proper information what has triggered the handler. The current API requires some guesswork to figure out the exact error condition (this includes checking the actual error message!).
  22. Helmut Hummel commented on patch set 5 CR -1 07/21/14, 11:09

    I agree with Martin here. We rather should introduce an exception hirarchy which represents the different error states so that the exception handler can act appropriately. We could also maybe deprecate the current (badly named) options then...
  23. Mathias Schreiber wrote 12/14/14, 15:59

    Topic changed from 23178 to Frontend
  24. Christian Kuhn commented on patch set 5 CR -1 V 0 12/14/14, 16:06

    Very good points. I agree to Helmut that this needs a totally different patch than, so this one here does not help us much for the time being. Thus, I'll now abandon this approach here, and will reset the according forge issue to "new" hinting for the discussion in this review here for someone to pick it up with a new attempt.
  25. Christian Kuhn abandoned the change 12/14/14, 16:07