Skip to content

Commit 880b35e

Browse files
committed
Ruby: Allow ORM tracking into ERb templates
1 parent f1115af commit 880b35e

File tree

1 file changed

+4
-1
lines changed
  • ruby/ql/lib/codeql/ruby/security

1 file changed

+4
-1
lines changed

Diff for: ruby/ql/lib/codeql/ruby/security/XSS.qll

+4-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,10 @@ private module OrmTracking {
298298
Shared::isAdditionalXssFlowStep(node1, node2)
299299
}
300300

301-
predicate isBarrierIn(DataFlow::Node node) { node instanceof DataFlow::SelfParameterNode }
301+
predicate isBarrierIn(DataFlow::Node node) {
302+
node instanceof DataFlow::SelfParameterNode and
303+
not node.getLocation().getFile() instanceof ErbFile
304+
}
302305
}
303306

304307
import DataFlow::Global<Config>

0 commit comments

Comments
 (0)