| Message: 74382 |
 |
BY: James Gray (bbazzarrakk) DATE: 2009-05-13 19:57 SUBJECT: RE: Help setting up FasterCSV to import a file That's a good question.
I can build a CSV file that is a big resource drain on FasterCSV's parser yes. Uploading that would be kind of like a DoS attack on your server.
However, there are ways you could combat this.
One option would be limit the size of what users can upload to something reasonable. You can do this with Rack middleware if you are using the latest version of Rails.
Another option is to wrap the parse in a Timeout.timeout { } call, so you cancel it if the parse gets stuck in a nasty data loop.
I hope that gives you some fresh ideas. | |