@@ -101,26 +101,26 @@ module ReflectedXSS {
101
101
class StringConstArrayInclusionCallAsSanitizerGuard extends SanitizerGuard ,
102
102
StringConstArrayInclusionCall { }
103
103
104
- /**
105
- * A `VariableWriteAccessCfgNode` that is not succeeded (locally) by another
106
- * write to that variable.
107
- */
108
- private class FinalInstanceVarWrite extends CfgNodes:: ExprNodes:: InstanceVariableWriteAccessCfgNode {
109
- private InstanceVariable var ;
110
-
111
- FinalInstanceVarWrite ( ) {
112
- var = this .getExpr ( ) .getVariable ( ) and
113
- not exists ( CfgNodes:: ExprNodes:: InstanceVariableWriteAccessCfgNode succWrite |
114
- succWrite .getExpr ( ) .getVariable ( ) = var |
115
- succWrite = this .getASuccessor + ( )
116
- )
117
- }
118
-
119
- InstanceVariable getVariable ( ) { result = var }
120
-
121
- AssignExpr getAnAssignExpr ( ) { result .getLeftOperand ( ) = this .getExpr ( ) }
104
+ /**
105
+ * A `VariableWriteAccessCfgNode` that is not succeeded (locally) by another
106
+ * write to that variable.
107
+ */
108
+ private class FinalInstanceVarWrite extends CfgNodes:: ExprNodes:: InstanceVariableWriteAccessCfgNode {
109
+ private InstanceVariable var ;
110
+
111
+ FinalInstanceVarWrite ( ) {
112
+ var = this .getExpr ( ) .getVariable ( ) and
113
+ not exists ( CfgNodes:: ExprNodes:: InstanceVariableWriteAccessCfgNode succWrite |
114
+ succWrite .getExpr ( ) .getVariable ( ) = var
115
+ |
116
+ succWrite = this .getASuccessor + ( )
117
+ )
122
118
}
123
119
120
+ InstanceVariable getVariable ( ) { result = var }
121
+
122
+ AssignExpr getAnAssignExpr ( ) { result .getLeftOperand ( ) = this .getExpr ( ) }
123
+ }
124
124
125
125
/**
126
126
* An additional step that is taint-preserving in the context of reflected XSS.
@@ -157,8 +157,8 @@ module ReflectedXSS {
157
157
or
158
158
// instance variables in the controller
159
159
exists (
160
- ActionControllerActionMethod action , VariableReadAccess viewVarRead ,
161
- AssignExpr ae , FinalInstanceVarWrite controllerVarWrite
160
+ ActionControllerActionMethod action , VariableReadAccess viewVarRead , AssignExpr ae ,
161
+ FinalInstanceVarWrite controllerVarWrite
162
162
|
163
163
viewVarRead = node2 .asExpr ( ) .( CfgNodes:: ExprNodes:: VariableReadAccessCfgNode ) .getExpr ( ) and
164
164
action .getDefaultTemplateFile ( ) = viewVarRead .getLocation ( ) .getFile ( ) and
0 commit comments