Improved link validation and sanatization, in order to mitigate CVE-2025-56200 from validator.js NPM package.
This commit is contained in:
parent
6bab5b4723
commit
06f552a9ec
9 changed files with 38 additions and 19 deletions
|
|
@ -173,7 +173,7 @@ module.exports.errorMiddleware = function(err, req, res, next){
|
|||
* @param {Error} err - error to dump to file
|
||||
* @param {Date} date - Date of error, defaults to now
|
||||
*/
|
||||
module.exports.dumpError = async function(err, date = new Date(), subDir){
|
||||
module.exports.dumpError = async function(err, date = new Date(), subDir = ''){
|
||||
try{
|
||||
//Crash directory
|
||||
const dir = `./log/crash/${subDir}`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue