[BUGFIX] Fix TCEmain hook for password encryption 31/16931/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 2 Dec 2012 00:55:09 +0000 (01:55 +0100)
committerAndreas Wolf <andreas.wolf@typo3.org>
Sun, 2 Dec 2012 18:11:02 +0000 (19:11 +0100)
Hook was not called and so passwords remained unencrypted, leading to a
failure on decryption.
Also the call to the EncryptionUtility needed a fix.

Change-Id: Ic65de75c07e9bef26e6111db31906309e79ab010
Fixes: #43512

Classes/Backend/TceMainHook.php
Classes/Driver/WebDavDriver.php
ext_localconf.php

index faa37b9..884db88 100644 (file)
@@ -11,10 +11,10 @@ class TceMainHook {
         * @param array $incomingFieldArray
         * @param string $table
         * @param integer|string $id
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tceMainObject
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMainObject
         * @return mixed
         */
-       public function processDatamap_preProcessFieldArray(&$incomingFieldArray, $table, $id, \TYPO3\CMS\Core\DataHandler\DataHandler $tceMainObject) {
+       public function processDatamap_preProcessFieldArray(&$incomingFieldArray, $table, $id, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMainObject) {
                if ($table !== 'sys_file_storage') {
                        return;
                }
@@ -41,7 +41,7 @@ class TceMainHook {
                        return;
                }
 
-               $password = \TYPO3\FalWebdav\Utility\Encryption::encryptPassword($password);
+               $password = \TYPO3\FalWebdav\Utility\EncryptionUtility::encryptPassword($password);
        }
 
 }
index 1117bc7..fa9fb7f 100644 (file)
@@ -75,7 +75,7 @@ class WebDavDriver extends \TYPO3\CMS\Core\Resource\Driver\AbstractDriver {
                $configuration['baseUrl'] = trim($configuration['baseUrl']);
                $password = \TYPO3\FalWebdav\Utility\EncryptionUtility::decryptPassword($configuration['password']);
 
-                       // TODO check useAuthentication configuration option
+               // TODO check useAuthentication configuration option
                $this->password = $password;
                $this->username = $configuration['username'];
 
index 25d0ce7..df8f2f4 100644 (file)
@@ -13,7 +13,7 @@ set_include_path($newPath . PATH_SEPARATOR . get_include_path());
 $registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Resource\Driver\DriverRegistry');
 $registry->registerDriverClass('TYPO3\FalWebdav\Driver\WebDavDriver', 'WebDav', 'WebDAV', 'FILE:EXT:fal_webdav/Configuration/FlexForm/WebDavDriverFlexForm.xml');
 
-$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['fal_webdav'] = 'Tx_FalWebdav_Backend_TceMainHook';
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['fal_webdav'] = 'TYPO3\\FalWebdav\\Backend\\TceMainHook';
 
 
        // Cache configuration, see http://wiki.typo3.org/Caching_Framework