[BUGFIX] Password in form is transferred as asterisks 58/42858/2
authorXavier Perseguers <xavier@typo3.org>
Mon, 24 Aug 2015 14:27:22 +0000 (16:27 +0200)
committerAlexander Opitz <opitz.alexander@googlemail.com>
Tue, 25 Aug 2015 07:06:32 +0000 (09:06 +0200)
Due to a wrong usage of $.inArray() which possibly returns
"0" if element is found at the first position within an array,
TCA fields with a single eval statement "password" are not
properly transferred to TYPO3.

Change-Id: Ic2647fbefc0ea7c9fef88288946af91343fcc55c
Resolves: #69153
Releases: master
Reviewed-on: http://review.typo3.org/42858
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js

index 118023f..f88c131 100644 (file)
@@ -232,7 +232,7 @@ define('TYPO3/CMS/Backend/FormEngineValidation', ['jquery', 'TYPO3/CMS/Backend/F
                        if (typeof typeConfig !== 'undefined' && typeConfig.length) {
                                type = typeConfig[0].type;
                        }
-                       if ($.inArray('password', evalList)) {
+                       if ($.inArray('password', evalList) !== -1) {
                                $mainField.val(origValue);
                                $humanReadableField.val(newValue);
                        } else {