'Manipulating file content in rails application
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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | D.j. Molny |
