Page MenuHomePhabricator

UploadWizard: uploading file with colon in name leads to error
Closed, ResolvedPublic

Description

To quote:

tried uploading a file with a colon (:) in the name on commons; it didn't disallow it, but I got this really unfriendly message:
Internal error
key '2muj1nywb867g7yba09qnnr99h4qos5.' is not in a proper format
Backtrace:
#0 /usr/local/apache/common-local/wmf-deployment/includes/upload/UploadBase.php(557): UploadStash->stashFile('/tmp/phpnXpjgd', Array, NULL)
#1 /usr/local/apache/common-local/wmf-deployment/includes/upload/UploadBase.php(569): UploadBase->stashSessionFile(NULL)
#2 /usr/local/apache/common-local/wmf-deployment/includes/specials/SpecialUpload.php(322): UploadBase->stashSession()
#3 /usr/local/apache/common-local/wmf-deployment/includes/specials/SpecialUpload.php(413): SpecialUpload->showUploadWarning(Array)
#4 /usr/local/apache/common-local/wmf-deployment/includes/specials/SpecialUpload.php(167): SpecialUpload->processUpload()
#5 /usr/local/apache/common-local/wmf-deployment/includes/SpecialPage.php(560): SpecialUpload->execute(NULL)
#6 /usr/local/apache/common-local/wmf-deployment/includes/Wiki.php(254): SpecialPage::executePath(Object(Title))
#7 /usr/local/apache/common-local/wmf-deployment/includes/Wiki.php(64): MediaWiki->handleSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
#8 /usr/local/apache/common-local/wmf-deployment/index.php(117): MediaWiki->performRequestForTitle(Object(Title), NULL,
Object(OutputPage), Object(User), Object(WebRequest))
#9 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#10 {main}


Version: unspecified
Severity: normal

Details

Reference
bz26209

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:13 PM
bzimport added a project: UploadWizard.
bzimport set Reference to bz26209.

(In reply to comment #0)

key '2muj1nywb867g7yba09qnnr99h4qos5.' is not in a proper format

Presumably this is because guessing the extension failed, and UploadStash tried to append ".$ext" anyway?

Another error here: http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=401676326#.22Internal_error.22

Looks like it's for svg's, and has something to do with the key created in conjunction with the filename.

neilk wrote:

For simplicity, I am disallowing colons client side now, as of r84313.

Presumably this will fix this bug, although I can't replicate it at the moment.

I've just run into this problem, so it doesn't seem to be fixed. When I add a file with a colon in the name to the upload wizard, I get the triangle with the "!" in it, and "Unknown error: "unknown-warning"."

If that's the intended behavior, it should give a more helpful error message.

The files I tried with are .png.

@sage the file with the colon. Was that the original title of the file you are uploading in the upload step, or was it the title you were trying to give to the final upload during the details step ?

This was during the upload step. The file name was: "Screenshot from 2012-08-17 17:24:54.png" or similar. (I tried it with a couple of screenshots with similar titles.)

OK, confirmed. A badfilename case and it is fixed since this commit https://gerrit.wikimedia.org/r/21698

The fix is not yet live on Commons.

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:25 AM
Gilles added a project: Multimedia.
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:22 AM