Manipulating file content in rails application

Viewed 27

I'm not a security expert. I'm working on a rails application where the user needs to upload a txt file to the app. The app doesn't store the file but reads its content and saves some of it in the database. Is it safe or not? If not is there a way to secure this like preventing the users from uploading txt files with malicious content?

1 Answers

You're rightly concerned about the possibility of a so-called injection attack.

The Rails Guide "Securing Rails Applications" is very thorough and has a section specifically on preventing various types of injection attacks.

Related