]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix dynamic string usage as safe input
authorvrana <jakubv@fb.com>
Sun, 3 Feb 2013 23:00:23 +0000 (15:00 -0800)
committervrana <jakubv@fb.com>
Sun, 3 Feb 2013 23:04:45 +0000 (15:04 -0800)
Summary: I somehow missed it.

Test Plan: Sent this diff by different copy of Arcanist.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D4800

scripts/arcanist.php

index e4d429a019066d86179ebd76f3d1c0b5be93387d..d9e14cd67b2097825912868ef1e0bee0a0b94a62 100755 (executable)
@@ -555,12 +555,17 @@ function reenter_if_this_is_arcanist_or_libphutil(
     $libphutil_path = dirname(phutil_get_library_root('phutil'));
   }
 
-  $err = phutil_passthru(
-    phutil_is_windows()
-      ? 'set ARC_PHUTIL_PATH=%s & %Ls'
-      : 'ARC_PHUTIL_PATH=%s %Ls',
-    $libphutil_path,
-    $original_argv);
+  if (phutil_is_windows()) {
+    $err = phutil_passthru(
+      'set ARC_PHUTIL_PATH=%s & %Ls',
+      $libphutil_path,
+      $original_argv);
+  } else {
+    $err = phutil_passthru(
+      'ARC_PHUTIL_PATH=%s %Ls',
+      $libphutil_path,
+      $original_argv);
+  }
 
   exit($err);
 }