dsql-admin/dsql-app/package-shared/functions/backend/db/pathTraversalCheck.js

15 lines
270 B
JavaScript
Raw Normal View History

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