1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +01:00

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:
Nick Harper 2013-03-19 15:30:16 -07:00
parent 34e0f617a5
commit 3f708710eb

View file

@ -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)',