Closed IagoAbal closed 2 years ago
It's translated as `foo.](bar)` where `foo.]` has the same range as `foo[:bar]` itself, this causes problems with taint-mode and field sensitivity. If `foo[:bar]` is tainted then `foo.]` is tainted by side-effect, and `foo[:other]` ends up being tainted too.
It was translated as
foo.](bar)
, wherefoo.]
had the same range asfoo[:bar]
itself. This caused problems with taint-mode and field sensitivity. Iffoo[:bar]
is tainted thenfoo.]
is tainted by side-effect, and thenfoo[:other]
ends up being tainted too.We now translate it as
foo.[(bar)
instead... we use[
and]
tokens instead of the fake(
and)
ones so the range of the Call node is the correct one.Helps PA-2087
test plan: Dump the AST of
foo[:bar]
and check itSecurity