Skip to content

Commit

Permalink
Potential fix for code scanning alert no. 15: Type confusion through …
Browse files Browse the repository at this point in the history
…parameter tampering

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
ptrumpis and github-advanced-security[bot] authored Jan 30, 2025
1 parent bdcf6bb commit 54e8b26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/endpoints/import/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const formMiddleWare = (req, res, next) => {
}
}

req.files = allFiles;
req.files = Array.isArray(allFiles) ? allFiles : [allFiles];
req.allowOverwrite = fields.allow_overwrite === 'true';

next();
Expand Down

0 comments on commit 54e8b26

Please sign in to comment.