Don't barf on bad commit identifiers
Summary: If someone provides an invalid svn rev number (like providing a git commit hash instead) for a diffusion commit, we should ignore it like we ignore other bad input to DiffusionCommitQuery, instead of barfing. Test Plan: put an invalid blame rev with rEsomehash (where E is an svn repo), and differential loads. Reviewers: epriestley, wez Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5389
This commit is contained in:
@@ -112,6 +112,9 @@ final class DiffusionCommitQuery
|
||||
}
|
||||
|
||||
if ($repo->isSVN()) {
|
||||
if (!ctype_digit($ref['identifier'])) {
|
||||
continue;
|
||||
}
|
||||
$sql[] = qsprintf(
|
||||
$conn_r,
|
||||
'(repositoryID = %d AND commitIdentifier = %d)',
|
||||
|
||||
Reference in New Issue
Block a user