Nexory opened a new pull request, #1880: URL: https://github.com/apache/wicket/pull/1880
`CSPDirective` does not know `require-trusted-types-for` and `trusted-types`, and both Ajax engines and three component scripts hand strings to DOM sinks, so every Ajax update fails on a page that enforces Trusted Types. This adds the two directives with the opt-in `CSPHeaderConfiguration.requireTrustedTypes()`, routes the sinks through `Wicket.TrustedTypes`, whose `wicket` policy passes server markup and scripts on unchanged, and writes the file names of `MultiFileUploadField.js` as text nodes. The new QUnit page `trusted-types.html` covers each sink under enforcement and runs with both engines. No preset includes the directives, and without them the rendered page does not change. Under enforcement two limits remain: handlers given as strings still go through `new Function` and do not run, and with the jQuery engine a `script` element inside replaced component markup fails the update, because jQuery 4.0.0 evaluates it from a string. Tested in headless Chrome. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
