datasquirel/package-shared/functions/backend/db/pathTraversalCheck.js

15 lines
270 B
JavaScript
Raw Permalink Normal View History

2024-11-06 06:26:23 +00:00
// @ts-check
/**
2024-12-09 11:45:39 +00:00
* # Path Traversal Check
2024-11-06 06:26:23 +00:00
*
* @param {string|number} text - Text or number or object
*
* @returns {string}
*/
function pathTraversalCheck(text) {
return text.toString().replace(/\//g, "");
}
module.exports = pathTraversalCheck;