[JS] Casting a SourceNode as Expr #13212
Closed
MaxSchlueter
started this conversation in
General
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? |
0 replies
|
Hi @MathiasVP, thank you for the quick response, that makes sense to me. If there were a predicate |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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
FunctionNodeinstead ofSourceNode, no castingasExpr()andinstanceofcheck needed. Why isgetALocalSource().asExpr() instanceof Functiondifferent from equaling this to aFunctionNode?All reactions