[JS] Casting a SourceNode as Expr #13212
Replies: 2 comments 1 reply
-
Hi @MaxSchlueter, Note that the CodeQL JavaScript library has several concepts of functions: Functions, FunctionExprs, and ArrowFunctionExprs. And when you write Does that explanation help? |
Beta Was this translation helpful? Give feedback.
-
Hi @MathiasVP, thank you for the quick response, that makes sense to me. If there were a predicate |
Beta Was this translation helpful? Give feedback.
-
Going through the GitHub Security Lab CTF 3 about XSS-unsafe jQuery plugins, I got the following query for Question 1.1:
which returns only 2 results, whereas 13 are expected. I saw that the official solution to this uses
FunctionNode
instead ofSourceNode
, no castingasExpr()
andinstanceof
check needed. Why isgetALocalSource().asExpr() instanceof Function
different from equaling this to aFunctionNode
?Beta Was this translation helpful? Give feedback.
All reactions