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:
607a84a
)
Avoid passing anything but a string to Title::newFromText in UploadBase::getTitle
author
Alex Monk
<krenair@gmail.com>
Sun, 23 Aug 2015 15:22:07 +0000
(16:22 +0100)
committer
Alex Monk
<krenair@gmail.com>
Sun, 23 Aug 2015 18:27:40 +0000
(19:27 +0100)
Bug: T109974
Change-Id: I54d42bcdcb95cb5b6a09c1c3bdea8891a14a7fdb
includes/upload/UploadBase.php
patch
|
blob
|
history
diff --git
a/includes/upload/UploadBase.php
b/includes/upload/UploadBase.php
index
493df2e
..
b06b91e
100644
(file)
--- a/
includes/upload/UploadBase.php
+++ b/
includes/upload/UploadBase.php
@@
-752,6
+752,12
@@
abstract class UploadBase {
if ( $this->mTitle !== false ) {
return $this->mTitle;
}
+ if ( !is_string( $this->mDesiredDestName ) ) {
+ $this->mTitleError = self::ILLEGAL_FILENAME;
+ $this->mTitle = null;
+
+ return $this->mTitle;
+ }
/* Assume that if a user specified File:Something.jpg, this is an error
* and that the namespace prefix needs to be stripped of.
*/