Last modified: 2013-04-22 16:16:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39108, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37108 - Initial duplicate check is broken in Firefox, Chrome (not Opera)
Initial duplicate check is broken in Firefox, Chrome (not Opera)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Mark Holmquist
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-25 01:41 UTC by Erik Moeller
Modified: 2013-04-22 16:16 UTC (History)
3 users (show)

See Also:
Web browser: Firefox
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Erik Moeller 2012-05-25 01:41:19 UTC
The sha-1 based duplicate check which should return a friendly "This file was previously uploaded" message on the first step is no longer working in (recent) Firefox/Chrome versions. It's still working in Opera, oddly enough.

The upload will still be rejected with at least a human-readable error message in the final step.
Comment 1 Mark Holmquist 2012-05-25 17:45:25 UTC
The reason it's working in Opera is because ApiUploadHandler doesn't set the ignorewarnings field, and we just made sure it would use that in a recent bug fix. Apparently, when ignorewarnings is set, the hash check is either not performed or not reported for some reason.

So, we could either unset ignorewarnings for FormDataTransport browsers, or we could set ignorewarnings for ApiUploadHandler browsers. In the former case, we lose some of the flexibility for title-related errors, which could be fixed in the Details step of UW. In the latter case, we lose any capacity to act on the hash check in the first step, but at least we're consistent.

The third option is to debug core and figure out why the hash check isn't performed when ignorewarnings is set and the duplicate filename error is already present (try renaming a file you've uploaded before, chrome and firefox will complain then). I'll start into this now, because both of the above options have major drawbacks.
Comment 2 Mark Holmquist 2012-05-25 19:42:14 UTC
Ha! Got it.

FormDataTransport wasn't using the same trick as the HTML form, adding the timestamp to the filename to avoid duplicate warnings. The server will only return 'duplicate' if there are both, so avoiding the harmless one is important on the first step.

Patch. Patch need review. Patch here: https://gerrit.wikimedia.org/r/8937
Comment 3 Ryan Kaldari 2012-08-30 01:52:29 UTC
Merged to trunk.
Comment 4 Erik Moeller 2012-08-30 02:16:40 UTC
Confirmed fixed in master.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links