Last modified: 2013-04-02 00:00:35 UTC
It is possible to mount an attack on the server by using UploadStash to: - upload zillions of small files (# of files per directory) - upload many very large files (disk usage) Expiry can't happen in less than a few hours since it may actually take that amount of time to upload some large videos. Not easy to do this just by examining the file system, since temp files are hashed up in directories, and aren't associated with a user or IP. Simple solution: - simple crontabs on the server to clean up temp files with a reasonable time frame like anything older than 3 days - guard methods on the UploadStash object to cycle out a user's old objects when they have more than 100 abandoned temp files, or more than 100 total MB
Asked Roan for comments -- Roan notes that a global limit would be a better guard against DOS. The worst case scenario is then files would be cycled out too quickly.
Decided this is not a blocker for UploadWizard, but it is a general API bug
Some sort of garbage collection could handle this in MW or a cron script
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Weekly cron has been running for months now.