dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5e336c
)
[FileRepo] Throw an exception if a storage key is invalid.
author
Aaron
<aschulz@wikimedia.org>
Thu, 20 Sep 2012 20:47:15 +0000
(13:47 -0700)
committer
Aaron
<aschulz@wikimedia.org>
Thu, 20 Sep 2012 20:47:15 +0000
(13:47 -0700)
Change-Id: Ie479d940dddcf7a9eca5d68a76fbe3fa70a6d4d7
includes/filerepo/FileRepo.php
patch
|
blob
|
history
diff --git
a/includes/filerepo/FileRepo.php
b/includes/filerepo/FileRepo.php
index
a31b148
..
5f24fed
100644
(file)
--- a/
includes/filerepo/FileRepo.php
+++ b/
includes/filerepo/FileRepo.php
@@
-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] . '/';