1
0
Fork 0

Fix escaping

pull/5380/merge
Jordi Boggiano 2016-06-21 11:01:35 +01:00
parent 4fe967d61a
commit f94d06ff0a
1 changed files with 2 additions and 2 deletions

View File

@ -45,11 +45,11 @@ class ProcessExecutor
{ {
if ($this->io && $this->io->isDebug()) { if ($this->io && $this->io->isDebug()) {
$safeCommand = preg_replace_callback('{(://)(?P<user>[^:/\s]+):(?P<password>[^@\s/]+)}i', function ($m) { $safeCommand = preg_replace_callback('{(://)(?P<user>[^:/\s]+):(?P<password>[^@\s/]+)}i', function ($m) {
if (preg_match('{^[a-f0-9]{12,}$}', $m[1])) { if (preg_match('{^[a-f0-9]{12,}$}', $m['user'])) {
return '://***:***'; return '://***:***';
} }
return '://'.$m[1].':***'; return '://'.$m['user'].':***';
}, $command); }, $command);
$this->io->writeError('Executing command ('.($cwd ?: 'CWD').'): '.$safeCommand); $this->io->writeError('Executing command ('.($cwd ?: 'CWD').'): '.$safeCommand);
} }