Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploaded files are not renamed #37

Closed
garak opened this issue Jun 6, 2013 · 3 comments
Closed

uploaded files are not renamed #37

garak opened this issue Jun 6, 2013 · 3 comments

Comments

@garak
Copy link

garak commented Jun 6, 2013

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

@boutell
Copy link
Member

boutell commented Jun 6, 2013

Filenames are being properly validated. See trim_file_name and accept_file_types in UploadHandler and also allowedExtensionsRegex in FileUploader.

@boutell boutell closed this as completed Jun 6, 2013
@garak
Copy link
Author

garak commented Jun 6, 2013

Anyway, renaming is needed also for enforce uniqueness.
What if a different file is uploaded with same name of an existing one?

@boutell
Copy link
Member

boutell commented Jun 6, 2013

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//issues/37#issuecomment-19043918
.

Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants