Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I'm setting up a few scripts to grab user input and store it in CSV files. The user input will consist of personal information such as name and email address and other information from survey forms consisting mostly of radio buttons and checkboxes.
What I'm trying to ensure is that all incoming data is filtered properly. Since I'm just storing the data, my primary concern is the length of the data. How is the best way to filter this? Just use Perl's length function as in if (length($blah) > $max_length) { error(); }?
I'm also validating some data using Email::Valid and it's nice little regex. Is there any other validation/checking I should be doing? I'm so used to filtering out questionable characters, but is there any point if I just storing this in a file? I'm not doing anything silly like using the input to name the file, so filtering combinations such as "../" doesn't appear necessary.
Thank you in advance for your advice.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Input Filtering Requirements
by AcidHawk (Vicar) on Aug 10, 2003 at 11:51 UTC | |
|
Re: Input Filtering Requirements
by blue_cowdawg (Monsignor) on Aug 10, 2003 at 14:15 UTC | |
by Anonymous Monk on Aug 10, 2003 at 16:31 UTC | |
by blue_cowdawg (Monsignor) on Aug 10, 2003 at 21:33 UTC | |
|
Re: Input Filtering Requirements
by waswas-fng (Curate) on Aug 11, 2003 at 04:15 UTC |