stable

Clone or download

Read-only

Closes request #28889: Harden calls to Git CLI against argument injection

The goal is to prevent the possibility for a malicious user to execute arbitrary command/write arbitrary files (see CVE-2021-29472 for example). No significant functional changes expected. Change-Id: I5d03f184acbde07faaf1890a713c2b02779c6f21

Modified Files

Name
M plugins/git/include/CommitMetadata/AuthorRetriever.php +3 −4 Go to diff View file
M plugins/git/include/CommitMetadata/CommitMessageRetriever.php +1 −2 Go to diff View file
M plugins/git/include/Git/Driver/Gerrit/ProjectCreator.class.php +1 −1 Go to diff View file
M plugins/git/include/GitPHP/git/Archive.php +1 −0 Go to diff View file
M plugins/git/include/GitPHP/git/Commit.php +1 −0 Go to diff View file
M plugins/git/include/GitPHP/git/Ref.php +1 −0 Go to diff View file
M plugins/git/include/Git_Exec.class.php +31 −39 Go to diff View file
M plugins/git/tests/unit/CommitMetadata/CommitMessageRetrieverTest.php +1 −1 Go to diff View file
M plugins/git/tests/unit/Git_ExecTest.php +4 −5 Go to diff View file
M plugins/pullrequest/include/PullRequest/GitExec.php +9 −9 Go to diff View file
M plugins/pullrequest/include/PullRequest/PullRequestCreator.php +3 −2 Go to diff View file