File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
javascript/ql/src/semmle/javascript/security/dataflow Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -120,25 +120,18 @@ module Shared {
120120 )
121121 }
122122
123- private import semmle.javascript.dataflow.internal.AccessPaths as Paths
124-
125123 /**
126- * Gets an access-path that is used in a sanitizing switch statement.
127- * The `pragma[noinline]` is to avoid materializing a cartesian product of all access-paths .
124+ * Gets an Ssa variable that is used in a sanitizing switch statement.
125+ * The `pragma[noinline]` is to avoid materializing a cartesian product.
128126 */
129127 pragma [ noinline]
130- private Paths:: AccessPath getAPathEscapedInSwitch ( ) {
131- exists ( Expr str |
132- isUsedInHTMLEscapingSwitch ( str ) and
133- result .getAnInstance ( ) = str
134- )
135- }
128+ private SsaVariable getAPathEscapedInSwitch ( ) { isUsedInHTMLEscapingSwitch ( result .getAUse ( ) ) }
136129
137130 /**
138131 * An expression that is sanitized by a switch-case.
139132 */
140133 class IsEscapedInSwitchSanitizer extends Sanitizer {
141- IsEscapedInSwitchSanitizer ( ) { this .asExpr ( ) = getAPathEscapedInSwitch ( ) .getAnInstance ( ) }
134+ IsEscapedInSwitchSanitizer ( ) { this .asExpr ( ) = getAPathEscapedInSwitch ( ) .getAUse ( ) }
142135 }
143136}
144137
You can’t perform that action at this time.
0 commit comments