Closed garak closed 11 years ago
Filenames are being properly validated. See trim_file_name and accept_file_types in UploadHandler and also allowedExtensionsRegex in FileUploader.
Anyway, renaming is needed also for enforce uniqueness. What if a different file is uploaded with same name of an existing one?
It replaces the other file. We regard this as a feature, but it might be nice to make it optional at some point. I'd certainly consider a pull request.
On Thu, Jun 6, 2013 at 9:12 AM, Massimiliano Arione < notifications@github.com> wrote:
Anyway, renaming is needed also for enforce uniqueness. What if a different file is uploaded with same name of an existing one?
— Reply to this email directly or view it on GitHubhttps://github.com/punkave/symfony2-file-uploader-bundle/issues/37#issuecomment-19043918 .
Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com
Not renaming uploaded file is a bad practice, since it can lead to security issues. A good example of renaming uploaded files is in https://github.com/dustin10/VichUploaderBundle/blob/master/Resources/doc/index.md#namers