Skip to content

Commit

Permalink
[BUGFIX] Fix scoping issue in FormEngineValidation
Browse files Browse the repository at this point in the history
theChar is not initialized and therefore pollutes global scope.
(It is assigned to window.theChar in the FormEngine iframe).

Currently not an error (we are not using strict mode in RequireJS),
just bad style, but once we switch to strict mode (type="module"),
this will fail without proper declaration.

Releases: main, 11.5
Resolves: #96395
Related: #96323
Change-Id: Ie82da6a1b664e4010179cccaabb07e7d87b19038
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72735
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
  • Loading branch information
bnf authored and andreaskienast committed Dec 20, 2021
1 parent 1728e5b commit 33ea9f3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ define([
case 'alphanum_x':
newString = '';
for (a = 0; a < value.length; a++) {
theChar = value.substr(a, 1);
var theChar = value.substr(a, 1);
var special = (theChar === '_' || theChar === '-');
var alpha = (theChar >= 'a' && theChar <= 'z') || (theChar >= 'A' && theChar <= 'Z');
var num = (theChar >= '0' && theChar <= '9');
Expand Down

0 comments on commit 33ea9f3

Please sign in to comment.