JS: Move 'this' sanitizer to customizations

This commit is contained in:
Asger F
2023-04-17 12:11:18 +02:00
parent 62dca44ee5
commit b728f71b4b
2 changed files with 7 additions and 3 deletions

View File

@@ -31,6 +31,13 @@ module UnsafeJQueryPlugin {
*/
abstract class Sanitizer extends DataFlow::Node { }
/**
* The receiver of a function, seen as a sanitizer.
*
* Plugins often do `$(this)` to coerce an existing DOM element to a jQuery object.
*/
private class ThisSanitizer extends Sanitizer instanceof DataFlow::ThisNode { }
/**
* An argument that may act as an HTML fragment rather than a CSS selector, as a sink for remote unsafe jQuery plugins.
*/