Actualizacion de seguridad

This commit is contained in:
Pablinux
2024-07-13 00:27:32 -05:00
parent 90f05f7ad0
commit fa92efc258
186 changed files with 75113 additions and 17648 deletions

View File

@@ -16,6 +16,7 @@ var restart = null;
var psTree = require('pstree.remy');
var path = require('path');
var signals = require('./signals');
const undefsafe = require('undefsafe');
const osRelease = parseInt(require('os').release().split('.')[0], 10);
function run(options) {
@@ -63,8 +64,11 @@ function run(options) {
const binPath = process.cwd() + '/node_modules/.bin';
const spawnOptions = {
env: Object.assign({}, process.env, options.execOptions.env, {
PATH: binPath + path.delimiter + process.env.PATH,
env: Object.assign({}, options.execOptions.env, process.env, {
PATH:
binPath +
path.delimiter +
(undefsafe(options, '.execOptions.env.PATH') || process.env.PATH),
}),
stdio: stdio,
};
@@ -129,7 +133,7 @@ function run(options) {
silent: !hasStdio,
};
if (utils.isWindows) {
forkOptions.windowsHide = true;
forkOptions.windowsHide = true;
}
child = fork(options.execOptions.script, forkArgs, forkOptions);
utils.log.detail('forking');
@@ -341,7 +345,12 @@ function kill(child, signal, callback) {
// We are handling a 'SIGKILL' , 'SIGUSR2' and 'SIGUSR1' POSIX signal under Windows the
// same way it is handled on a UNIX system: We are performing
// a hard shutdown without waiting for the process to clean-up.
if (signal === 'SIGKILL' || osRelease < 10 || signal === 'SIGUSR2' || signal==="SIGUSR1" ) {
if (
signal === 'SIGKILL' ||
osRelease < 10 ||
signal === 'SIGUSR2' ||
signal === 'SIGUSR1'
) {
debug('terminating process group by force: %s', child.pid);
// We are using the taskkill utility to terminate the whole