Workaround for bugs with Commonist (mwapi-based) and other upload bots.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 22 Sep 2009 23:44:32 +0000 (23:44 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 22 Sep 2009 23:44:32 +0000 (23:44 +0000)
commitd2ac90018f2e0dc66990b10945a08e6848fb1e19
tree4d77bccf03a5f7be8b950627ae3e1dc6daf02ee0
parent9fc3cdde59c5e08ec0ca35deca4d2fae0c71dc70
Workaround for bugs with Commonist (mwapi-based) and other upload bots.
The upload form recently started checking for wpEditToken, but this is only actually needed when we do uploads by URL -- file uploads can't be injected by a CSRF script. Now skipping the token check if the token was empty and we're doing a regular file upload.
Confirmed that Commonist current JNLP release can upload to Wikimedia Commons with this patch.
includes/specials/SpecialUpload.php