Project

General

Profile

Actions

Bug #100787

closed

$GLOBALS['TSFE']->fe_user->setKey() seems not to create cookie "fe_typo_user"

Added by Alex Kellner almost 1 year ago. Updated almost 1 year ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Authentication
Target version:
Start date:
2023-05-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

We're currently working hard to bring powermail back to live in 12. One obstactle seems to be the session handling. In 12 all captchas are not working any more.

What we see was, that this code seems not to work any more:

# Create "fe_typo_user" cookie and store a value in the related database table
$GLOBALS['TSFE']->fe_user->setKey('ses', 'foo', ['foo' => 'bar']);

Can you please tell us what we're missing here?


Addition: So it's not possible to read the value when page is reloaded with:

$GLOBALS['TSFE']->fe_user->getKey('ses', 'foo');


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #100695: Move Cookie logic out of userAuthClosedBenni Mack2023-04-20

Actions
Actions #1

Updated by Alex Kellner almost 1 year ago

  • Description updated (diff)
Actions #2

Updated by Oliver Hader almost 1 year ago

  • Status changed from New to Needs Feedback

Usually the middleware \TYPO3\CMS\Frontend\Middleware\FrontendUserAuthenticator would call $frontendUser->storeSessionData(); automatically.

Can you please share a link to a powermail branch, that can be used for testing the behavior you described?

Actions #3

Updated by Oliver Hader almost 1 year ago

  • Related to Task #100173: Mark several internal methods and properties protected in UserAuthentication added
Actions #4

Updated by Oliver Hader almost 1 year ago

\TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::$dontSetCookie now seems to be always true, which avoids adding the session cookie via \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::setSessionCookie

Actions #5

Updated by Oliver Hader almost 1 year ago

  • Related to deleted (Task #100173: Mark several internal methods and properties protected in UserAuthentication)
Actions #6

Updated by Oliver Hader almost 1 year ago

  • Related to Task #100695: Move Cookie logic out of userAuth added
Actions #7

Updated by Gerrit Code Review almost 1 year ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78923

Actions #8

Updated by Oliver Hader almost 1 year ago

  • Category set to Authentication
  • Target version set to 12 LTS
  • Is Regression set to Yes
Actions #9

Updated by Oliver Hader almost 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF