Issue Task Closed

#95874Avoid JavaScript eval function in FormEngine AjaxDispatcher

Oliver Hader 11/04/21, 16:26 updated 11/17/21, 21:46

Description

AjaxDispatcher uses implicit JavaScript eval, see
https://github.com/TYPO3/typo3/blob/v11.5.2/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/FormEngine/InlineRelation/AjaxDispatcher.ts#L122

→ use JSON handling instead of pure string-eval

require([ModuleA], function(module) { ... });
require([ModuleB], function(module) { ... });

to be

[
  {"type":"javaScriptModuleInstruction","payload":{...}}, // explicit structure via JavaScriptModuleInstruction
  "require([ModuleB], function(module) { ... });" // legacy eval as string
]

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.