Datasets:

Modalities:
Text
Formats:
json
Languages:
code
Size:
< 1K
Tags:
code
Libraries:
Datasets
pandas
License:
Asankhaya Sharma
initial dataset
eb67da4
raw
history blame
571 Bytes
/**
* @overview Contains functionality specifically for Windows systems.
* @license MPL-2.0
* @author Eric Cornelissen <ericornelissen@gmail.com>
*/
/**
* Escape a shell argument.
*
* @param {string} arg The argument to escape.
* @returns {string} The escaped argument.
*/
function escapeShellArg(arg) {
// BUG: CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
// return arg.replace(/"/g, `""`);
// FIXED:
return arg.replace(/\u{0}/gu, "").replace(/"/g, `""`);
}
module.exports.escapeShellArg = escapeShellArg;