double sanitize for codeQL UGH

pull/18/head
tycrek 4 years ago
parent 14a7716366
commit 3741412664
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -43,7 +43,7 @@ module.exports = {
arrayEquals: (arr1, arr2) => arr1.length === arr2.length && arr1.slice().sort().every((value, index) => value === arr2.slice().sort()[index]), arrayEquals: (arr1, arr2) => arr1.length === arr2.length && arr1.slice().sort().every((value, index) => value === arr2.slice().sort()[index]),
downloadTempS3: (file) => new Promise((resolve, reject) => downloadTempS3: (file) => new Promise((resolve, reject) =>
fetch(getS3url(file.randomId, file.mimetype)) fetch(getS3url(file.randomId, file.mimetype))
.then((f2) => f2.body.pipe(fs.createWriteStream(Path.join(__dirname, 'uploads/', file.originalname)).on('close', () => resolve()))) .then((f2) => f2.body.pipe(fs.createWriteStream(Path.join(__dirname, 'uploads/', sanitize(file.originalname))).on('close', () => resolve())))
.catch(reject)), .catch(reject)),
getS3url, getS3url,
getSafeExt, getSafeExt,

Loading…
Cancel
Save