62 $this->header =
'Errors found in your configuration';
63 $this->preText =
'SaltedPasswords will not work until these problems have been resolved:<br />';
68 $this->header =
'Warnings about your configuration';
69 $this->preText =
'SaltedPasswords might behave different than expected:<br />';
75 $this->header =
'Additional information';
76 $this->preText =
'<br />';
81 if ($this->errorType < FlashMessage::WARNING && $this->errorType !=
FlashMessage::INFO) {
83 $this->header =
'No errors were found';
84 $this->preText =
'SaltedPasswords has been configured correctly and works as expected.<br />';
98 if (count($this->problems) > 0) {
100 <li>###PROBLEMS###</li> 102 $message = str_replace(
'###PROBLEMS###', implode(
'<br /> </li><li>', $this->problems), $message);
105 Note, that a wrong configuration might have impact on the security of 106 your TYPO3 installation and the usability of the backend.';
109 if (empty($message)) {
112 $message = $this->preText . $message;
114 return $flashMessage->render();
124 $extConf = unserialize(
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXT'][
'extConf'][
'saltedpasswords']);
125 $this->extConf[
'BE'] = array_merge((array)
$extConf[
'BE.'], (array) $requestSetup[
'BE.']);
126 $this->extConf[
'FE'] = array_merge((array) $extConf[
'FE.'], (array) $requestSetup[
'FE.']);
127 $GLOBALS[
'LANG']->includeLLFile(
'EXT:saltedpasswords/locallang.xlf');
141 $SSL = ((int)
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'lockSSL'] > 0 &&
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'loginSecurityLevel'] !==
'superchallenged');
146 $problems[] =
'The backend is configured to use SaltedPasswords over SSL.';
147 } elseif ($rsaAuthLoaded) {
148 if (trim(
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'loginSecurityLevel']) ===
'rsa') {
149 if ($this->isRsaAuthBackendAvailable()) {
151 $problems[] =
'The backend is configured to use SaltedPasswords with RSA authentication.';
155 $problems[] =
'<strong>Using the extension "rsaauth" is not possible, as no encryption backend ' .
156 'is available. Please install and configure the PHP extension "openssl". ' .
157 'See <a href="http://php.net/manual/en/openssl.installation.php" target="_blank">PHP.net</a></strong>.';
162 $problems[] =
'The "rsaauth" extension is installed, but TYPO3 is not configured to use it during login. 163 Use the Install Tool to set the Login Security Level for the backend to "rsa" 164 ($TYPO3_CONF_VARS[\'BE\'][\'loginSecurityLevel\'])';
169 $problems[] =
'SaltedPasswords is used without any transfer encryption, this means your passwords are sent in plain text. 170 Please install rsaauth to secure your passwords submits.<br /> 172 <li>Install the "rsaauth" extension and use the Install Tool to set the 173 Login Security Level for the backend to "rsa" 174 ($TYPO3_CONF_VARS[\'BE\'][\'loginSecurityLevel\'])</li> 176 <li>If you have the option to use SSL, you can also configure your 177 backend for SSL usage:<br /> 178 Use the Install Tool to set the Security-Level for the backend 179 to "normal" ($TYPO3_CONF_VARS[\'BE\'][\'loginSecurityLevel\']) and 180 the SSL-locking option to a value greater than "0" 181 (see description - $TYPO3_CONF_VARS[\'BE\'][\'lockSSL\'])</li> 184 It is also possible to use "lockSSL" and "rsa" Login Security Level at the same 192 $problems[] =
'SaltedPasswords has been configured to be the only authentication service for 193 the backend. Additionally, usage of salted passwords is enforced (forceSalted). 194 The result is that there is no chance to login with users not having a salted 196 <strong><i>WARNING:</i></strong> This may lock you out of the backend!';
200 $problems[] =
'SaltedPasswords has been configured to be the only authentication service for 201 the backend. This means that other services like "ipauth", "openid", etc. will 202 be ignored (except "rsauth", which is implicitely used).';
208 $problems[] =
'SaltedPasswords has been configured to enforce salted passwords (forceSalted). 210 This means that only passwords in the format of this extension will succeed for 216 $problems[] =
'SaltedPasswords is configured wrong and will not work as expected:<br /> 217 It is not possible to set "updatePasswd" and "forceSalted" at the same time. 218 Please disable either one of them.';
222 if ($instance === NULL || !$instance->isAvailable()) {
224 $problems[] =
'The selected method for hashing your salted passwords is not available on this 225 system! Please check your configuration.';
236 protected function isRsaAuthBackendAvailable() {
243 $backend = $rsaauthBackendFactory->getBackend();
260 if (!\
TYPO3\CMS\Core\Utility\GeneralUtility::inList(
'normal,rsa',
$GLOBALS[
'TYPO3_CONF_VARS'][
'FE'][
'loginSecurityLevel'])) {
262 $problems[] =
'<strong>IMPORTANT:</strong><br /> 263 Frontend requirements for SaltedPasswords are not met, therefore the 264 authentication will not work even if it was explicitly enabled for frontend 267 <li>Install the "rsaauth" extension and use the Install Tool to set the 268 Login Security Level for the frontend to "rsa" 269 ($TYPO3_CONF_VARS[\'FE\'][\'loginSecurityLevel\'])</li> 271 <li>Alternatively, use the Install Tool to set the Login Security Level 272 for the frontend to "normal" 273 ($TYPO3_CONF_VARS[\'FE\'][\'loginSecurityLevel\'])</li> 276 Make sure that the Login Security Level is not set to "" or "challenged"!';
277 } elseif (trim(
$GLOBALS[
'TYPO3_CONF_VARS'][
'FE'][
'loginSecurityLevel']) ===
'rsa') {
278 if (\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded(
'rsaauth')) {
279 if ($this->isRsaAuthBackendAvailable()) {
281 $problems[] =
'The frontend is configured to use SaltedPasswords with RSA authentication.';
285 $problems[] =
'<strong>Using the extension "rsaauth" is not possible, as no encryption backend ' 286 .
'is available. Please install and configure the PHP extension "openssl". ' 287 .
'See <a href="http://php.net/manual/en/openssl.installation.php" target="_blank">PHP.net</a></strong>.';
292 $problems[] =
'The "rsaauth" extension is not installed, but TYPO3 CMS is configured to use it.' 293 .
' Either install the extension or adapt the configuration by setting [FE][loginSecurityLevel]' 294 .
' to "normal" in the Install Tool.';
302 $problems[] =
'SaltedPasswords has been configured to enforce salted passwords (forceSalted). 304 This means that only passwords in the format of this extension will succeed for 306 <strong><i>IMPORTANT:</i></strong> Because of this, it is not possible to login with 307 users not having a salted password hash (e.g. existing frontend users).';
311 $problems[] =
'SaltedPasswords has been configured to be the only authentication service for 312 frontend logins. This means that other services like "ipauth", "openid", etc. 319 $problems[] =
'SaltedPasswords has been configured to enforce salted passwords (forceSalted). 321 This means that only passwords in the format of this extension will succeed for 323 <strong><i>IMPORTANT:</i></strong> This has the effect that passwords that were set 324 before SaltedPasswords was used will not work (in fact, they need to be 330 $problems[] =
'SaltedPasswords is configured wrong and will not work as expected:<br /> 331 It is not possible to set "updatePasswd" and "forceSalted" at the same time. 332 Please disable either one of them.';
337 $problems[] =
'SaltedPasswords has been disabled for frontend users.';
353 $propertyName = $params[
'propertyName'];
354 $unknownVariablePleaseRenameMe =
'\'' . substr(md5($propertyName), 0, 10) .
'\'';
357 foreach ($registeredMethods as $class => $reference) {
359 if ($classInstance instanceof \
TYPO3\CMS\Saltedpasswords\Salt\SaltInterface && $classInstance->isAvailable()) {
360 $sel = $this->extConf[$disposal][
'saltedPWHashingMethod'] == $class ?
' selected="selected" ' :
'';
361 $label =
'ext.saltedpasswords.title.' . strtolower(end(explode(
'\\', $class)));
362 $p_field .=
'<option value="' . htmlspecialchars($class) .
'"' . $sel .
'>' .
$GLOBALS[
'LANG']->getLL($label) .
'</option>';
365 $p_field =
'<select id="' . $propertyName .
'" name="' . $params[
'fieldName'] .
'" onChange="uFormUrl(' . $unknownVariablePleaseRenameMe .
')">' . $p_field .
'</select>';
399 foreach ($postArray as $key => $value) {
401 $parts = explode(
'.', $key, 2);
402 if (count($parts) == 2) {
405 $postArray[$parts[0] .
'.'] = array_merge((array) $postArray[($parts[0] .
'.')], $value);
408 $postArray[$parts[0]] = $value;
static getRegisteredSaltedHashingMethods()
checkConfigurationFrontend(array $params, $pObj)
processPostData(array $postArray=array())
buildHashMethodSelector(array $params, $pObj, $disposal)
static getSaltingInstance($saltedHash='', $mode=TYPO3_MODE)
static getUserObj($classRef, $checkPrefix='', $silent=FALSE)
static makeInstance($className)
buildHashMethodSelectorFE(array $params, $pObj)
static isLoaded($key, $exitOnError=FALSE)
buildHashMethodSelectorBE(array $params, $pObj)
checkConfigurationBackend(array $params, $pObj)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]