Last modified: 2005-06-14 17:20:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 548 - [PATCH] Existing images are overwritten without notice
[PATCH] Existing images are overwritten without notice
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
All All
: High major (vote)
: ---
Assigned To: Kelson [Emmanuel Engelhart]
: patch
Depends on:
  Show dependency treegraph
Reported: 2004-09-21 15:11 UTC by Benjamin Jemlich
Modified: 2005-06-14 17:20 UTC (History)
1 user (show)

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

slightly tested patch which implements version 1 (diff against REL1_3) (3.64 KB, patch)
2004-09-22 11:24 UTC, Benjamin Jemlich

Description Benjamin Jemlich 2004-09-21 15:11:12 UTC
If someone uploads an image which already exists, the old image is overwritten 
without any logentry or history change if the user doesn't click the ReUpload button.

The new image is saved with the same filename as the old image and the reupload 
button restores it to the old version.

Possible Solutions:
1.) Save the image with a temporary name and rename it on confirm. (Would require a 
maintainance script which removes old images)
2.) Restore the image on the next action of the user (Same problem as now if the user 
does nothing after the warning)
3.) Let the user reupload the image when he accepts to overwrite the old image
Comment 1 Benjamin Jemlich 2004-09-22 11:24:45 UTC
Created attachment 46 [details]
slightly tested patch which implements version 1 (diff against REL1_3)
Comment 2 JeLuF 2004-11-06 12:41:35 UTC
Can't reproduce this any more. Has this been fixed in the meantime?
Comment 3 Brion Vibber 2004-11-15 05:49:25 UTC
Bug confirmed still present in REL1_3 and HEAD.
Comment 4 Brion Vibber 2004-11-15 11:36:22 UTC
I've made a somewhat more extensive reworking based on Benjamin's 
patch. All 'warning'ed uploads are held in the temp dir until confirmed or 
canceled. Also I fixed a logic error in the check for protected images, 
moved some of the checks around, and generally did some clean-up.

While the situation with files getting left there if the user takes no action 
is unsatisfying, it's actually the same as what the previous code did, only 
now the garbage files are in a separate tree and no longer pollute the 
main image file area. Future improvements are welcome, of course.

Fixed in HEAD, REL1_3, and live on Wiki*edia.

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