mirror of
https://github.com/PGYER/codefever.git
synced 2026-06-04 08:37:42 +08:00
fix(Command): filter "`" for comamnd (shell inject)
This commit is contained in:
@@ -1466,14 +1466,14 @@ class Repository_model extends CI_Model
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$branch = Command::wrapArgument($branch);
|
||||
$filePath = Command::wrapArgument($filePath);
|
||||
|
||||
$command = GitCommand::getLastLog($branch, $filePath, $lastSha);
|
||||
if (!$command) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$branch = Command::wrapArgument($branch);
|
||||
$filePath = Command::wrapArgument($filePath);
|
||||
|
||||
$log = $this->execCommand($rKey, $uKey, GIT_COMMAND_QUERY, $command);
|
||||
$log = rtrim($log, Helper::getDelimiter() . "\n");
|
||||
$log = $this->_logStringToArray($log);
|
||||
|
||||
Reference in New Issue
Block a user