Comparing version 2.3.84 to 2.3.85
{ | ||
"name": "netget", | ||
"version": "2.3.84", | ||
"version": "2.3.85", | ||
"description": "Rette Adepto/ Recibido Directamente.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -0,1 +1,2 @@ | ||
//configureDefaultServerBlock.js | ||
import fs from 'fs'; | ||
@@ -49,3 +50,5 @@ import chalk from 'chalk'; | ||
const tryElevatedPrivileges = (path, data) => { | ||
const command = `echo '${data.replace(/'/g, "\\'")}' | sudo tee ${path}`; | ||
// Proper escaping of data to be echoed | ||
const escapedData = escapeDataForShell(data); | ||
const command = `echo '${escapedData}' | sudo tee ${path} > /dev/null && sudo systemctl reload nginx`; | ||
execShellCommand(command).then(() => { | ||
@@ -58,2 +61,6 @@ console.log(chalk.green('Successfully configured NGINX with elevated privileges.')); | ||
const escapeDataForShell = (data) => { | ||
return data.replace(/'/g, "'\\''"); | ||
}; | ||
const displayManualInstructions = (path, data) => { | ||
@@ -60,0 +67,0 @@ console.log(chalk.yellow('Please follow these instructions to manually configure the NGINX server block:')); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
873388
1169