‪TYPO3CMS  10.4
InstallToolFormProtection.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
61 {
65  protected function ‪retrieveSessionToken()
66  {
67  if (isset($_SESSION['installToolFormToken']) && !empty($_SESSION['installToolFormToken'])) {
68  $this->sessionToken = $_SESSION['installToolFormToken'];
69  } else {
70  $this->sessionToken = $this->‪generateSessionToken();
71  $this->‪persistSessionToken();
72  }
73  }
74 
79  public function ‪persistSessionToken()
80  {
81  $_SESSION['installToolFormToken'] = ‪$this->sessionToken;
82  }
83 }
‪TYPO3\CMS\Core\FormProtection\AbstractFormProtection\$sessionToken
‪string $sessionToken
Definition: AbstractFormProtection.php:40
‪TYPO3\CMS\Core\FormProtection\InstallToolFormProtection
Definition: InstallToolFormProtection.php:61
‪TYPO3\CMS\Core\FormProtection
Definition: AbstractFormProtection.php:16
‪TYPO3\CMS\Core\FormProtection\InstallToolFormProtection\persistSessionToken
‪persistSessionToken()
Definition: InstallToolFormProtection.php:79
‪TYPO3\CMS\Core\FormProtection\InstallToolFormProtection\retrieveSessionToken
‪retrieveSessionToken()
Definition: InstallToolFormProtection.php:65
‪TYPO3\CMS\Core\FormProtection\AbstractFormProtection
Definition: AbstractFormProtection.php:30
‪TYPO3\CMS\Core\FormProtection\AbstractFormProtection\generateSessionToken
‪string generateSessionToken()
Definition: AbstractFormProtection.php:121