Review main Merged

63183[FEATURE] Implement SameSite option for TYPO3 cookies

Benni Mack CR +2 V +2 Hard +227 −59 updated 02/16/20, 12:21

Commit message

This change introduces a new security option for setting the SameSite
option to all cookies sent by TYPO3 Core.

Namely:
- Frontend User Sessions ("lax" by default)
- Backend User Sessions ("strict" by default)
- Install Tool Sessions ("strict", none-configurable)
- Last Login Provider in Backend ("strict", non-configurable)

This means that these can only be accessed by scripts and requests
by the same site, and not by any third-party scripts.

Since we're talking about actual cookies for a user, and not
ads-related or third-party login-dependant cookies, the default
options fit just perfectly.

All modern browsers except Internet Explorer respect this option
to be set. Please note that Firefox and Chrome will have "SameSite=lax"
set in Q1/2020 by default if NO SameSite option is set at all. This change
allows to configure this.

Backend and Frontend User Cookies can be configured to "strict", "lax"
or "none" (= same as before), whereas "none" only works for secure
connections (= HTTPS).

If "strict" is in place, security via CSRF is not needed anymore, and can
be dropped in the future.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Anja Leichsenring +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Anja Leichsenring +1
    • TYPO3com +1 CI

Issues 1

Files 9

Review log 1417

  1. Benni Mack uploaded patch set 1 02/10/20, 06:51

  2. Benni Mack uploaded patch set 2 02/10/20, 20:48

  3. Benni Mack uploaded patch set 3 02/10/20, 21:12

  4. Benni Mack updated the commit message in patch set 4 02/11/20, 07:34

  5. Benni Mack uploaded patch set 5 02/12/20, 20:29

  6. Benni Mack uploaded patch set 6 02/12/20, 20:45

  7. TYPO3com voted on patch set 6 V -1 02/12/20, 20:59 Completed build in 13m 32s on Wed, 12 Feb, 08:59 PM Test Summary: 1 of 71713 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17

  8. Frank Nägler uploaded patch set 7 02/12/20, 21:43

  9. TYPO3com voted on patch set 7 V +1 02/12/20, 21:56 Completed build in 13m 03s on Wed, 12 Feb, 09:56 PM Test Summary: 71262 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19

  10. Frank Nägler voted on patch set 7 CR +1 02/13/20, 07:42

  11. Benni Mack uploaded patch set 8 02/13/20, 09:13

  12. Anja Leichsenring voted on patch set 8 V +1 CR +1 02/13/20, 09:20

  13. TYPO3com voted on patch set 8 V +1 02/13/20, 09:26 Completed build in 13m 06s on Thu, 13 Feb, 09:26 AM Test Summary: 71262 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-29

  14. Georg Ringer voted on patch set 8 V +2 CR +2 02/13/20, 09:36

  15. Georg Ringer merged patch set 9 02/13/20, 09:36

  16. Oliver Hader commented on patch set 9 02/13/20, 10:35

    WorkspacePreview::setCookie() is missing...
  17. Susi Moog commented on patch set 9 02/16/20, 12:21

    the 9.5 version also got an update on fallback for PHP < 7.3