Review main Merged

30485[BUGFIX] Keep session cookie if session data is present

Markus Klein CR +2 V +2 Easy +2 −2 updated 06/02/14, 16:26

Commit message

The AbstractUserAuthentication::checkAuthentication() method calls
the logoff() method on every failed login attempt.

Since a logoff also causes a removal of the cookie,
any (anonymous) session data will be left unaccessible.

Keep the cookie when session data is present.

Review

  • Code review CR +2
    • Markus Klein +2
    • Stefan Neufeind +1
    • Wouter Wolters +1
    • Helmut Hummel +1
  • Verified V +2
    • Markus Klein +2
    • Helmut Hummel +1

Issues 1

Files 1

Review log 25

  1. Markus Klein uploaded patch set 2 05/29/14, 12:19

  2. Mr. Jenkins commented on patch set 1 05/29/14, 12:29

  3. Mr. Jenkins commented on patch set 2 05/29/14, 12:33

  4. Felix Kopp commented on patch set 2 05/30/14, 16:35

    Login broken without patch, work with patch. But did not test other features (password forgot, …).
  5. Markus Klein commented on patch set 2 05/30/14, 16:45

    @Felix: Other feature should not be affected at all, since I only change stuff explicitly in the type="login" part.
  6. Stefan Neufeind commented on patch set 2 05/31/14, 23:02

    A general thumbs-up for avoiding the logoff()-call. I'm not too proud we have to call the logoff-hooks now. But I agree it might be the best way to not break stuff *sigh* Or does somebody feel like we can "risk it" and maybe introduce a login-hook here instead for those extensions that relied on the "broken" behaviour until now and need to adapt?
  7. Helmut Hummel commented on patch set 2 V -1 CR -1 06/01/14, 11:59

    The problem is not the deletion of the session (which is exactly what also happens in older TYPO3 versions) but that the cookie is deleted.
  8. Helmut Hummel voted on patch set 2 V 0 06/01/14, 12:16

  9. Helmut Hummel uploaded patch set 3 06/01/14, 12:27

  10. Wouter Wolters commented on patch set 3 06/01/14, 12:30

    FrontendUserAuthentication.php:483

    anonymos -> anonymous
  11. Markus Klein commented on patch set 3 06/01/14, 12:30

    Do not really like that solution as it introduces yet another DB query. The former solution removes one.

    FrontendUserAuthentication.php:483

    typo in anonymous
  12. Mr. Jenkins commented on patch set 3 06/01/14, 12:42

  13. Helmut Hummel commented on patch set 3 V +1 CR +1 06/01/14, 12:52

    the measured overhead on my system is 0.015 microseconds even on lower powered systems, the additional select query will be cached (as it is exactly the same query that is fired, and has to be fired, anyway before). besides that I didn't like the fact to duplicate code (for hooks) and find it important not to change the behavior regarding discarding a potentially present session during failed login (the query removed in your patch)
  14. Helmut Hummel uploaded patch set 4 06/01/14, 13:01

  15. Helmut Hummel commented on patch set 3 06/01/14, 13:01

    FrontendUserAuthentication.php:483 Reply

    Done
  16. Helmut Hummel voted on patch set 4 V +1 CR +1 06/01/14, 13:01

  17. Markus Klein voted on patch set 4 CR +1 06/01/14, 13:05

  18. Wouter Wolters voted on patch set 4 CR +1 06/01/14, 13:05

  19. Mr. Jenkins commented on patch set 4 06/01/14, 13:14

  20. Stefan Neufeind voted on patch set 4 CR +1 06/01/14, 13:33

  21. Markus Klein commented on patch set 4 CR 0 06/01/14, 14:11

    Ok this patch has one difference: on log out the cookie is not removed.
  22. Helmut Hummel commented on patch set 4 06/01/14, 18:59

    @Markus: the cookie is not removed when session data is present If no session data is present, the cookie will be removed on logout
  23. Markus Klein voted on patch set 4 V +2 CR +2 06/01/14, 19:04

  24. Markus Klein merged patch set 5 06/01/14, 19:04

  25. Helmut Hummel commented on patch set 5 06/02/14, 16:26

    Thanks for taking care Markus!