From: Aaron Schulz Date: Sun, 4 Dec 2011 23:34:24 +0000 (+0000) Subject: Added file old version name sanity check to recordUpload2() X-Git-Tag: 1.31.0-rc.0~26183 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=6cc931502f07fd2d1fc6dcf9d850a2c462eda7bd;p=lhc%2Fweb%2Fwiklou.git Added file old version name sanity check to recordUpload2() --- 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