67032[FEATURE] Only set cookies for HTTP Responses in PSR-15 middlewares
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
- TYPO3com +1 CI
Issues 1
Files 5
- Build/Scripts/duplicateExceptionCodeCheck.sh+1 −0
- typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php3+42 −14
- typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php2+35 −16
- typo3/sysext/core/Documentation/Changelog/master/Feature-93011-Authentication-relatedCookiesAreAttachedToPSR-7Responses.rstnew+31 −0
- typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php+1 −0
Review log 1625
-
Benni Mack uploaded patch set 1 12/06/20, 12:12
-
TYPO3com voted on patch set 1 V -1 12/06/20, 12:21 Completed build in 09m 03s on Sun, 6 Dec, 12:21 PM Test Summary: 5 of 32654 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7849
-
Benni Mack uploaded patch set 2 12/06/20, 15:49
-
TYPO3com voted on patch set 2 V -1 12/06/20, 15:49 Completed build in 23s on Sun, 6 Dec, 03:49 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7865
-
Benni Mack uploaded patch set 3 12/07/20, 07:35
-
TYPO3com voted on patch set 3 V -1 12/07/20, 07:35 Completed build in 18s on Mon, 7 Dec, 07:35 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7883
-
TYPO3com commented on patch set 3 12/07/20, 08:09 Completed build in 33m 56s on Mon, 7 Dec, 08:09 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7883
-
Benni Mack uploaded patch set 4 12/07/20, 09:55
-
TYPO3com voted on patch set 4 V -1 12/07/20, 10:05 Completed build in 09m 28s on Mon, 7 Dec, 10:05 AM Test Summary: 32413 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7895
-
Benni Mack uploaded patch set 5 12/07/20, 10:09
-
Benjamin Franzke commented on patch set 5 12/07/20, 10:17
-
TYPO3com voted on patch set 5 V -1 12/07/20, 10:20 Completed build in 11m 06s on Mon, 7 Dec, 10:20 AM Test Summary: 32413 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7896
-
Markus Klein commented on patch set 5 12/07/20, 10:25
AbstractUserAuthentication.php:974really the name? -
Benni Mack rebased onto patch set 6 12/07/20, 14:35
-
Benni Mack uploaded patch set 7 12/07/20, 14:35
-
TYPO3com voted on patch set 6 V -1 12/07/20, 15:00 Completed build in 18m 32s on Mon, 7 Dec, 03:00 PM Test Summary: 32411 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7914
-
TYPO3com voted on patch set 7 V -1 12/07/20, 15:00 Completed build in 18m 46s on Mon, 7 Dec, 03:00 PM Test Summary: 32411 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7915
-
Oli Bartsch uploaded patch set 8 12/07/20, 15:24
-
TYPO3com voted on patch set 8 V +1 12/07/20, 15:33 Completed build in 09m 20s on Mon, 7 Dec, 03:33 PM Test Summary: 32411 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7922
-
Benni Mack commented on patch set 8 12/07/20, 15:40
@bnf I suggest we get this in and then change the code as soon as we have solution for your generic Exception solution, OK? -
Oli Bartsch voted on patch set 8 V +1 CR +1 12/07/20, 16:43
-
Benjamin Franzke commented on patch set 8 CR +1 12/07/20, 20:04
Reply
Yes, fine with me. In theory I would prefer to get this one in first: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67048 I think it's a bit difficult to review this patch with the inverted method name. On the other hand: That method existed with than name since 9.5, so it can wait for another patch as well.BackendUserAuthenticator.php:82Hm.. From what I see ImmediateResponseException will never be thrown from backendCheckLogin(). Yes, theoretically it's thrown there, but as login-state is already checked in line 75 using $this->context->getAspect('backend.user')->isLoggedIn(), this exception should never happen here. Now, that means the catch block is actually intended for those exceptions, that're possibly thrown in "inner" middlewares or controllers, right? Or can you actually trigger backendCheckLogin() to trigger this exception, with the aspect login check before? I'm asking because I'd like to refactor this to use response propagation exceptions (where Immediate responses are passed through the middleware stack) at some point and then this catch block would then only be left with backendCheckLogin() + createFromUserPreferences() which actually don't throw. On the other hand: The issue really is that we double check login-state here, that needs to be refactored anyway, so this can probably go in as is. -
Benjamin Franzke voted on patch set 8 V +2 CR +2 12/08/20, 07:39
-
Benjamin Franzke commented on patch set 8 12/08/20, 07:40
BackendUserAuthenticator.php:87Replywill be done afterwards.AbstractUserAuthentication.php:974ReplyDone -
Benjamin Franzke merged patch set 9 12/08/20, 07:40
BackendUserAuthenticator.php:87