Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
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.


Thread View

Thread Author Date
Help setting up FasterCSV to import a fileDemetrius Olsen2009-05-13 00:47
      RE: Help setting up FasterCSV to import a fileJames Gray2009-05-13 03:22
            RE: Help setting up FasterCSV to import a fileDemetrius Olsen2009-05-13 04:46
                  RE: Help setting up FasterCSV to import a fileJames Gray2009-05-13 14:53
                        RE: Help setting up FasterCSV to import a fileDemetrius Olsen2009-05-13 16:32
                              RE: Help setting up FasterCSV to import a fileJames Gray2009-05-13 19:57
                                    RE: Help setting up FasterCSV to import a fileDemetrius Olsen2009-05-13 23:24

Post a followup to this message