[TASK] Update md5 checksums for system extensions
[Packages/TYPO3.CMS.git] / typo3 / sysext / saltedpasswords / ext_tables.php
1 <?php
2 if (!defined ('TYPO3_MODE')) {
3 die ('Access denied.');
4 }
5
6
7 t3lib_div::loadTCA('fe_users');
8 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['max'] = 60;
9
10 if (tx_saltedpasswords_div::isUsageEnabled('FE')) {
11
12 // Get eval field operations methods as array keys
13 $operations = array_flip(t3lib_div::trimExplode(',', $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'], TRUE));
14
15 // Remove md5 and temporary password from the list of evaluated methods
16 unset($operations['md5'], $operations['password']);
17
18 // Append new methods to have "password" as last operation.
19 $operations['tx_saltedpasswords_eval_fe'] = 1;
20 $operations['password'] = 1;
21
22 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
23 unset($operations);
24 }
25
26
27 t3lib_div::loadTCA('be_users');
28 $GLOBALS['TCA']['be_users']['columns']['password']['config']['max'] = 60;
29
30 if (tx_saltedpasswords_div::isUsageEnabled('BE')) {
31
32 // Get eval field operations methods as array keys
33 $operations = array_flip(t3lib_div::trimExplode(',', $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'], TRUE));
34
35 // Remove md5 and temporary password from the list of evaluated methods
36 unset($operations['md5'], $operations['password']);
37
38 // Append new methods to have "password" as last operation.
39 $operations['tx_saltedpasswords_eval_be'] = 1;
40 $operations['password'] = 1;
41
42 $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
43 unset($operations);
44
45 // Prevent md5 hashing on client side via JS
46 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['password']['eval'] = '';
47 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['password2']['eval'] = '';
48 }
49
50
51 ?>