Skip to content

Commit 806e615

Browse files
committed
Explicitly use argument index in CdsTransaction.getContextObject/0
1 parent 689e00a commit 806e615

File tree

1 file changed

+1
-1
lines changed
  • javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap

1 file changed

+1
-1
lines changed

javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap/CDS.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ class CdsTransaction extends SourceNode {
607607

608608
SourceNode getContextObject() {
609609
/* 1. An object node passed as the first argument to a call to `srv.tx`. */
610-
result = txCall.getAnArgument().getALocalSource() and not result instanceof FunctionNode
610+
result = txCall.getArgument(0).getALocalSource() and not result instanceof FunctionNode
611611
or
612612
/* 2. A manually overriden `cds.context`. */
613613
exists(Stmt stmt, CdsFacade cds |

0 commit comments

Comments
 (0)