Commit b8930510 authored by Leigh Stoller's avatar Leigh Stoller

Another small fix to previous revision.

parent 27740c3f
......@@ -981,7 +981,16 @@ function Do_BindParameters()
$script = $profile->script();
$paramdefs = $profile->paramdefs();
# Repo argument to rungenilib;
$runopts .= " -r " . $profile->reponame();
if ($profile->repourl()) {
$runopts .= " -r " . $profile->reponame();
if (isset($ajax_args["refspec"])) {
if (!preg_match('/^[-\w\/]+$/', $ajax_args["refspec"])) {
SPITAJAX_ERROR(1, "Invalid refspec");
return;
}
$runopts .= " -h " . escapeshellarg($ajax_args["refspec"]);
}
}
}
unset($formfields["script"]);
unset($formfields["paramdefs"]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment