File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed
test/library-tests/TaintTracking Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -140,22 +140,17 @@ module MembershipCandidate {
140
140
EnumerationRegExp ( ) {
141
141
this .isRootTerm ( ) and
142
142
RegExp:: isFullyAnchoredTerm ( this ) and
143
- exists ( RegExpTerm child | this .getAChild * ( ) = child |
144
- child instanceof RegExpSequence or
145
- child instanceof RegExpCaret or
146
- child instanceof RegExpDollar or
147
- child instanceof RegExpConstant or
148
- child instanceof RegExpAlt or
149
- child instanceof RegExpGroup
150
- ) and
151
- // exclude "length matches" that match every string
152
- not this .getAChild * ( ) instanceof RegExpDot
143
+ not exists ( RegExpTerm child | child .getRootTerm ( ) = this |
144
+ child instanceof RegExpDot or
145
+ child instanceof RegExpCharacterClass or
146
+ child instanceof RegExpUnicodePropertyEscape
147
+ )
153
148
}
154
149
155
150
/**
156
151
* Gets a string matched by this regular expression.
157
152
*/
158
- string getAMember ( ) { result = this . getAChild * ( ) .getAMatchedString ( ) }
153
+ string getAMember ( ) { result = any ( RegExpTerm t | t . getRootTerm ( ) = this ) .getAMatchedString ( ) }
159
154
}
160
155
161
156
/**
Original file line number Diff line number Diff line change 238
238
| promise.js:18:22:18:29 | source() | promise.js:24:10:24:10 | e |
239
239
| promise.js:33:21:33:28 | source() | promise.js:38:10:38:10 | e |
240
240
| promise.js:43:20:43:27 | source() | promise.js:43:8:43:28 | Promise ... urce()) |
241
+ | regexp-sanitiser.js:2:19:2:26 | source() | regexp-sanitiser.js:4:14:4:18 | taint |
241
242
| rxjs.js:3:1:3:8 | source() | rxjs.js:10:14:10:17 | data |
242
243
| rxjs.js:13:1:13:8 | source() | rxjs.js:17:23:17:23 | x |
243
244
| rxjs.js:13:1:13:8 | source() | rxjs.js:18:23:18:23 | x |
Original file line number Diff line number Diff line change 1
1
function foo ( ) {
2
2
const taint = source ( ) ;
3
3
if ( / ^ a s d [ \s \S ] * $ / . test ( taint ) ) {
4
- sink ( taint ) ; // NOT OK [INCONSISTENCY]
4
+ sink ( taint ) ; // NOT OK
5
5
}
6
6
}
You can’t perform that action at this time.
0 commit comments