From 6cc931502f07fd2d1fc6dcf9d850a2c462eda7bd Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 4 Dec 2011 23:34:24 +0000 Subject: [PATCH] Added file old version name sanity check to recordUpload2() --- includes/filerepo/file/LocalFile.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index df7144330e..74eb0c7d9d 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1007,6 +1007,9 @@ class LocalFile extends File { ); if ( $dbw->affectedRows() == 0 ) { + if ( $oldver == '' ) { + throw new MWException( "Empty oi_archive_name. Database and storage out of sync?" ); + } $reupload = true; # Collision, this is an update of a file -- 2.20.1