Browse Source

Fix ProcessExecutor url escaping

Jordi Boggiano 8 years ago
parent
commit
046c2d64a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Composer/Util/ProcessExecutor.php

+ 1 - 1
src/Composer/Util/ProcessExecutor.php

@@ -44,7 +44,7 @@ class ProcessExecutor
     public function execute($command, &$output = null, $cwd = null)
     {
         if ($this->io && $this->io->isDebug()) {
-            $safeCommand = preg_replace('{(://)(?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])) {
                     return '://***:***';
                 }