You've already forked nginx-proxy-manager
							
							
				mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 18:05:34 +03:00 
			
		
		
		
	Fix remote execution bug where email address can contain malicious code
also convert almost all cmd execs for certificates to properly escape arguments
This commit is contained in:
		| @@ -29,15 +29,19 @@ module.exports = { | ||||
| 	/** | ||||
| 	 * @param   {String} cmd | ||||
| 	 * @param   {Array}  args | ||||
| 	 * @param   {Object|undefined}  options | ||||
| 	 * @returns {Promise} | ||||
| 	 */ | ||||
| 	execFile: (cmd, args) => { | ||||
| 		// logger.debug('CMD: ' + cmd + ' ' + (args ? args.join(' ') : '')); | ||||
| 	execFile: (cmd, args, options) => { | ||||
| 		logger.debug(`CMD: ${cmd} ${args ? args.join(' ') : ''}`); | ||||
| 		if (typeof options === 'undefined') { | ||||
| 			options = {}; | ||||
| 		} | ||||
|  | ||||
| 		return new Promise((resolve, reject) => { | ||||
| 			execFile(cmd, args, (err, stdout, /*stderr*/) => { | ||||
| 			execFile(cmd, args, options, (err, stdout, stderr) => { | ||||
| 				if (err && typeof err === 'object') { | ||||
| 					reject(err); | ||||
| 					reject(new error.CommandError(stderr, 1, err)); | ||||
| 				} else { | ||||
| 					resolve(stdout.trim()); | ||||
| 				} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user