Review main Merged

50808[BUGFIX] Streamline cookie options / remove cookieHttpOnly

Bas v.d. Wiel CR +2 V +2 Easy +8 −8 updated 03/01/17, 05:34

Commit message

The TYPO3_CONF_VARS[SYS][cookieHttpOnly] option is removed
as all cookies set by the TYPO3 Core are HttpOnly by default
in order to avoid client side script access.

This option was previously turned on by default but configurable
as old browser did not support this option all the time (see
https://www.owasp.org/index.php/HttpOnly#Browsers_Supporting_HttpOnly
for more details).

The be_lastLoginProvider and workspaces cookies now
set the httpOnly flag properly as well.

Review

  • Code review CR +2
    • Benni Mack +2
    • Markus Klein +1
    • Wouter Wolters +1
  • Verified V +2
    • Benni Mack +2
    • Markus Klein +1
    • Wouter Wolters +1
    • TYPO3com +1 CI

Issues 1

Files 6

Review log 4461

Show 2636 earlier messages
  1. Bas v.d. Wiel uploaded patch set 1 11/29/16, 16:10

  2. TYPO3com voted on patch set 1 V +1 11/29/16, 16:14 Completed build in 04m 04s on Tue, 29 Nov, 05:14 PM Test Summary: 54077 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5194

  3. Markus Klein updated the commit message in patch set 2 11/29/16, 17:33

  4. Markus Klein commented on patch set 3 11/29/16, 17:35

    Published edit on patch set 2.
  5. Markus Klein voted on patch set 3 CR +1 11/29/16, 17:35

  6. TYPO3com voted on patch set 2 V +1 11/29/16, 17:37 Completed build in 04m 09s on Tue, 29 Nov, 06:37 PM Test Summary: 54077 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5195

  7. TYPO3com voted on patch set 3 V +1 11/29/16, 17:38 Completed build in 03m 42s on Tue, 29 Nov, 06:38 PM Test Summary: 54077 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5196

  8. Wouter Wolters voted on patch set 3 CR +1 11/29/16, 18:17

  9. Richard Haeser voted on patch set 3 CR +1 11/29/16, 19:41

  10. Andreas Kienast voted on patch set 3 CR +1 11/29/16, 20:23

  11. Oliver Klee voted on patch set 3 CR +1 11/30/16, 09:41

  12. Wouter Wolters commented on patch set 3 CR -1 12/01/16, 21:00

    Please check typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php:491 This function is feeded with the same parameters but some calculations are done before setting them in the setcookie method.
  13. Markus Klein commented on patch set 3 CR 0 12/01/16, 23:53

    good catch wouter
  14. Bas v.d. Wiel commented on patch set 3 CR -1 12/02/16, 11:20

    This should actually go into some kind of centralized "cookiejar" to prevent duplication of code that deals with cookies. I don't feel like duplicating the entire function from AbstractUserAuthentication.php for this. Centralizing it properly is is a bit beyond my familiarity with the core at this time though.
  15. Anja Leichsenring uploaded patch set 4 12/02/16, 15:58

  16. TYPO3com voted on patch set 4 V -1 12/02/16, 16:02 Completed build in 03m 47s on Fri, 2 Dec, 05:02 PM Test Summary: 54119 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5348

  17. Anja Leichsenring uploaded patch set 5 12/02/16, 16:03

  18. Oliver Klee commented on patch set 6 12/02/16, 16:07

    Published edit on patch set 5.
  19. TYPO3com voted on patch set 5 V +1 12/02/16, 16:08 Completed build in 04m 09s on Fri, 2 Dec, 05:08 PM Test Summary: 54119 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5349

  20. TYPO3com voted on patch set 6 V +1 12/02/16, 16:11 Completed build in 03m 41s on Fri, 2 Dec, 05:11 PM Test Summary: 54119 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5350

  21. Anja Leichsenring commented on patch set 6 12/02/16, 16:22

    urgs, good catch, thank you Olli!
  22. Anja Leichsenring commented on patch set 6 CR -1 12/02/16, 16:23

    need to clean up
  23. Anja Leichsenring uploaded patch set 7 12/02/16, 16:28

  24. TYPO3com voted on patch set 7 V +1 12/02/16, 16:33 Completed build in 04m 39s on Fri, 2 Dec, 05:33 PM Test Summary: 54119 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5353

  25. Markus Klein commented on patch set 7 12/02/16, 23:46

    How do we handle that in 7.6? Backport the whole thing?

    AbstractUserAuthentication.php:361

    why do we need that class member?
  26. Anja Leichsenring commented on patch set 7 12/03/16, 08:47

    not sure about the backport, to be honest. Tend to say 'master only'.

    AbstractUserAuthentication.php:361 Reply

    because it is used twice in the class. If you prefer two GU::makeInstance calls, I am fine with that, too.
  27. Markus Klein commented on patch set 7 CR -1 12/03/16, 10:06

    Then lets make it master only

    AbstractUserAuthentication.php:361 Reply

    below you use a local var as well ;-) I would go with 2x makeInstance, tbh
  28. Anja Leichsenring commented on patch set 7 12/03/16, 10:11

    AbstractUserAuthentication.php:361 Reply

    true enough, mea culpa. Will rework.
  29. Anja Leichsenring uploaded patch set 8 12/03/16, 10:15

  30. Anja Leichsenring updated the commit message in patch set 9 12/03/16, 10:16

  31. TYPO3com voted on patch set 8 V +1 12/03/16, 10:21 Completed build in 05m 35s on Sat, 3 Dec, 11:21 AM Test Summary: 54202 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5380

  32. TYPO3com voted on patch set 9 V +1 12/03/16, 10:22 Completed build in 05m 57s on Sat, 3 Dec, 11:22 AM Test Summary: 54202 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5381

  33. Anja Leichsenring commented on patch set 9 CR -1 01/30/17, 21:05

    some jam for the cookiejar - on it currently.
  34. Anja Leichsenring uploaded patch set 10 01/30/17, 21:33

  35. Anja Leichsenring uploaded patch set 11 01/30/17, 21:37

  36. TYPO3com voted on patch set 10 V +1 01/30/17, 21:37 Completed build in 04m 43s on Mon, 30 Jan, 10:37 PM Test Summary: 55655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7255

  1. Anja Leichsenring uploaded patch set 12 01/30/17, 21:39

  2. TYPO3com voted on patch set 11 V +1 01/30/17, 21:42 Completed build in 05m 08s on Mon, 30 Jan, 10:42 PM Test Summary: 55655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7256

  3. TYPO3com voted on patch set 12 V +1 01/30/17, 21:46 Completed build in 06m 18s on Mon, 30 Jan, 10:46 PM Test Summary: 55655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7257

  4. Markus Klein commented on patch set 12 CR -1 01/30/17, 22:01

    AbstractUserAuthentication.php:998

    can be removed too, as above

    CookieService.php:30

    needs a description what input causes which value to be taken

    CookieService.php:35

    typehints everywhere

    CookieService.php:47

    no need for this cast, we are in boolean context anyway

    PreviewHook.php:243

    instantiate within the next if clause, not on uppermost level

    PreviewHook.php:248

    really needed?

    PreviewHook.php:307

    really needed?
  5. Anja Leichsenring commented on patch set 12 01/31/17, 08:45

    PreviewHook.php:307 Reply

    yes, we can't tell what the cookieDomain is. So it is not granted the base path will end up in cookiePath. Same above.
  6. Anja Leichsenring uploaded patch set 13 01/31/17, 08:45

  7. TYPO3com voted on patch set 13 V +1 01/31/17, 08:51 Completed build in 05m 14s on Tue, 31 Jan, 09:51 AM Test Summary: 55655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7265

  8. Georg Ringer voted on patch set 13 CR +1 V +1 01/31/17, 09:36

  9. Wouter Wolters commented on patch set 13 01/31/17, 09:46

    CookieService.php:17

    I prefer an empty line above the use statements.

    CookieService.php:19

    this class comment contains 2 spaces instead of 1
  10. Anja Leichsenring uploaded patch set 14 01/31/17, 09:50

  11. Benni Mack commented on patch set 13 CR -1 01/31/17, 09:51

    When introducing a new API, I would suggest to not call it Bugfix. Also, I'm strongly in favor of dropping the option (!) to unset the httpOnly flag. This needs to be set at any time, and all modern browsers support this https://www.owasp.org/index.php/HttpOnly#Browsers_Supporting_HttpOnly So, before introducing a new API, let's kick the option "httpOnly" and make it true by default.
  12. Benni Mack commented on patch set 14 CR -1 01/31/17, 09:51

    my -1 still applies
  13. TYPO3com voted on patch set 14 V +1 01/31/17, 09:55 Completed build in 05m 06s on Tue, 31 Jan, 10:55 AM Test Summary: 55655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7268

  14. Anja Leichsenring commented on patch set 14 01/31/17, 09:58

    I will not drive this patch further. Take over if you consider the time right.
  15. Benni Mack uploaded patch set 15 02/01/17, 05:51

  16. TYPO3com voted on patch set 15 V +1 02/01/17, 05:57 Completed build in 05m 33s on Wed, 1 Feb, 06:57 AM Test Summary: 55655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7292

  17. Benni Mack uploaded patch set 16 02/28/17, 07:44

  18. TYPO3com voted on patch set 16 V +1 02/28/17, 07:57 Completed build in 12m 34s on Tue, 28 Feb, 08:57 AM Test Summary: 56297 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8727

  19. Markus Klein commented on patch set 16 02/28/17, 12:27

    incomplete sentence
  20. Wouter Wolters updated the commit message in patch set 17 02/28/17, 18:25

  21. Wouter Wolters voted on patch set 17 CR +1 V +1 02/28/17, 18:25

  22. Markus Klein voted on patch set 17 CR +1 V +1 02/28/17, 18:31

  23. TYPO3com voted on patch set 17 V +1 02/28/17, 18:34 Completed build in 08m 47s on Tue, 28 Feb, 07:34 PM Test Summary: 56321 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8771

  24. Benni Mack voted on patch set 17 CR +2 V +2 03/01/17, 05:34

  25. Gerrit merged patch set 17 03/01/17, 05:34