Merge "CologneBlue rewrite: kill mWatchLinkNum, watchThisPage() is only called once...
[lhc/web/wiklou.git] / includes / filerepo / FileRepo.php
index a31b148..5f24fed 100644 (file)
@@ -1321,6 +1321,9 @@ class FileRepo {
         * @return string
         */
        public function getDeletedHashPath( $key ) {
+               if ( strlen( $key ) < 31 ) {
+                       throw new MWException( "Invalid storage key '$key'." );
+               }
                $path = '';
                for ( $i = 0; $i < $this->deletedHashLevels; $i++ ) {
                        $path .= $key[$i] . '/';