Skip to content

Commit fb5cfcc

Browse files
committed
OrmTracking goes through or expressions
1 parent be018cc commit fb5cfcc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ql/lib/codeql/ruby/security/XSS.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ module ReflectedXSS {
240240
class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { }
241241
}
242242

243-
module OrmTracking {
243+
private module OrmTracking {
244244
/**
245245
* A data flow configuration to track flow from finder calls to field accesses.
246246
*/
@@ -257,6 +257,9 @@ module OrmTracking {
257257
or
258258
// Propagate flow through arbitrary method calls
259259
node2.(DataFlow2::CallNode).getReceiver() = node1
260+
or
261+
// Propagate flow through "or" expressions `or`/`||`
262+
node2.asExpr().getExpr().(LogicalOrExpr).getAnOperand() = node1.asExpr().getExpr()
260263
}
261264
}
262265
}

0 commit comments

Comments
 (0)