Improved link validation and sanatization, in order to mitigate CVE-2025-56200 from validator.js NPM package.

This commit is contained in:
rainbow napkin 2025-10-18 07:21:17 -04:00
parent 6bab5b4723
commit 06f552a9ec
9 changed files with 38 additions and 19 deletions

View file

@ -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}`