소스 검색

Using escapeshellarg() instead of quotes

Michael Ridgway 14 년 전
부모
커밋
7b02384fb2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      vendors.php

+ 2 - 2
vendors.php

@@ -40,8 +40,8 @@ foreach ($deps as $dep) {
 
     $installDir = $vendorDir.'/'.$name;
     if (!is_dir($installDir)) {
-        system(sprintf('git clone %s "%s"', $url, $installDir));
+        system(sprintf('git clone %s %s', $url, escapeshellarg($installDir)));
     }
 
-    system(sprintf('cd "%s" && git fetch origin && git reset --hard %s', $installDir, $rev));
+    system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), $rev));
 }