Last modified: 2005-06-14 17:20:00 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 T2548, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 548 - [PATCH] Existing images are overwritten without notice
[PATCH] Existing images are overwritten without notice
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Kelson [Emmanuel Engelhart]
: patch
Depends on:
Blocks:
  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: ---


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

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.

Reason:
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.


Navigation
Links