ilosuna / phpsqlitecms

phpSQLiteCMS is a simple and lightweight web content management system based on PHP and SQLite.
phpsqlitecms.net
MIT License
138 stars 75 forks source link

File Upload input checking #9

Closed anguscarr closed 10 years ago

anguscarr commented 10 years ago

I accidentally uploaded a blank file - I didn't browse to the picture, or drag and drop or type a name... - my mistake.

The upload script allowed me to upload the non-file, and it then erased / screwed up my media folder. I deleted it from the command line checked out a new copy.

sudo rm -rf media
sudo git checkout HEAD -- media

In an ideal world, the upload script should have checked for valid data.