File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 54
54
"topcoder-bus-api-wrapper" : " topcoder-platform/tc-bus-api-wrapper.git" ,
55
55
"uuid" : " ^3.3.2" ,
56
56
"winston" : " ^3.1.0" ,
57
+ "xss" : " ^1.0.6" ,
57
58
"yamljs" : " ^0.3.0"
58
59
},
59
60
"standard" : {
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const busApi = require('topcoder-bus-api-wrapper')
17
17
const elasticsearch = require ( 'elasticsearch' )
18
18
const moment = require ( 'moment' )
19
19
const HttpStatus = require ( 'http-status-codes' )
20
+ const xss = require ( 'xss' )
20
21
21
22
// Bus API Client
22
23
let busApiClient
@@ -301,7 +302,8 @@ async function scan (modelName, scanParams) {
301
302
function partialMatch ( filter , value ) {
302
303
if ( filter ) {
303
304
if ( value ) {
304
- return RegExp ( filter , 'i' ) . test ( value )
305
+ const filtered = xss ( filter )
306
+ return value . includes ( filtered )
305
307
} else {
306
308
return false
307
309
}
You can’t perform that action at this time.
0 commit comments