[BUGFIX] Editing *_users with saltedpasswords active fails
authorSteffen Ritter <info@rs-websystems.de>
Mon, 3 Sep 2012 13:44:10 +0000 (15:44 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 4 Sep 2012 08:15:00 +0000 (10:15 +0200)
Since the namespace changes, the custom form-field-
evaluators for passwords shipped by saltedpasswords are
registered using the namespaced classes.

As the registered class name is used by tceForms to build
an internal JS function, the JS is broken due to the fact
that backslashes are not allowed in JS function names.

This patch reverts back to "classic" classnames as eval
identifier.

Change-Id: Ica52c01456be7a8ee2b7988cc9773586852621a6
Fixes: #40561
Releases: 6.0
Reviewed-on: http://review.typo3.org/14315
Reviewed-by: Mario Rimann
Tested-by: Mario Rimann
Tested-by: Marcel Burkhalter
Reviewed-by: Francois Suter
Tested-by: Francois Suter
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/saltedpasswords/ext_localconf.php
typo3/sysext/saltedpasswords/ext_tables.php

index 2048946..89a2053 100644 (file)
@@ -3,9 +3,9 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 // Form evaluation function for fe_users
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['TYPO3\\CMS\\Saltedpasswords\\Evaluation\\Evaluator_fe'] = 'EXT:saltedpasswords/Classes/eval/class.tx_saltedpasswords_eval_fe.php';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['tx_saltedpasswords_eval_fe'] = 'EXT:saltedpasswords/Classes/Evaluation/FrontendEvaluator.php';
 // Form evaluation function for be_users
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['TYPO3\\CMS\\Saltedpasswords\\Evaluation\\BackendEvaluator'] = 'EXT:saltedpasswords/Classes/eval/class.tx_saltedpasswords_eval_be.php';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['tx_saltedpasswords_eval_be'] = 'EXT:saltedpasswords/Classes/Evaluation/BackendEvaluator.php';
 // Hook for processing "forgotPassword" in felogin
 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['password_changed'][] = 'EXT:saltedpasswords/Classes/class.tx_saltedpasswords_div.php:TYPO3\\CMS\\Saltedpasswords\\Utility\\SaltedPasswordsUtility->feloginForgotPasswordHook';
 // Registering all available hashes to factory
index 0f1e31d..0e746c8 100644 (file)
@@ -10,7 +10,7 @@ if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('F
        // Remove md5 and temporary password from the list of evaluated methods
        unset($operations['md5'], $operations['password']);
        // Append new methods to have "password" as last operation.
-       $operations['TYPO3\\CMS\\Saltedpasswords\\Evaluation\\Evaluator_fe'] = 1;
+       $operations['tx_saltedpasswords_eval_fe'] = 1;
        $operations['password'] = 1;
        $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
        unset($operations);
@@ -23,7 +23,7 @@ if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('B
        // Remove md5 and temporary password from the list of evaluated methods
        unset($operations['md5'], $operations['password']);
        // Append new methods to have "password" as last operation.
-       $operations['TYPO3\\CMS\\Saltedpasswords\\Evaluation\\BackendEvaluator'] = 1;
+       $operations['tx_saltedpasswords_eval_be'] = 1;
        $operations['password'] = 1;
        $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
        unset($operations);