Project

General

Profile

Actions

Bug #99710

closed

EXT:felogin - Show Cookie Warning doesn't work

Added by Davide Alghi over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
felogin
Target version:
-
Start date:
2023-01-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
felogin,cookie,warning
Complexity:
Is Regression:
Sprint Focus:

Description

Cookie warning is never shown.

$this->showCookieWarning

is set "true" only if user is logged in and if warning is required(?), here
https://github.com/TYPO3/typo3/blob/92b8a70a855eaccce3fa500ffab9c5a340e98f41/typo3/sysext/felogin/Classes/Controller/LoginController.php#L70

but

$this->userService->cookieWarningRequired()

uses

$this->feUser->isCookieSet()

https://github.com/TYPO3/typo3/blob/92b8a70a855eaccce3fa500ffab9c5a340e98f41/typo3/sysext/felogin/Classes/Service/UserService.php#L47

isCookieSet()

is always "true", if the user is logged in,

https://github.com/TYPO3/typo3/blob/92b8a70a855eaccce3fa500ffab9c5a340e98f41/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php#L928

because

$this->setCookie

is always "true", if the user is logged in.

The one and only way to check, if cookies are disabled (by the browser), is to check $_COOKIE array.
I think there is no way to check whether the cookies are disabled or not, until the request is fully executed.
One way would be to check (and show cookie warning message) via ajax, just after the page has loaded.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #100135: Remove cookieWarning in ext:feloginClosedTorben Hansen2023-03-10

Actions
Actions

Also available in: Atom PDF