in reply to Re^3: How to get post parameters and print/log them in Perl
in thread How to get post parameters and print/log them in Perl
"for *known* data input, I would rather use existing tools than re-invent the wheel.
As touched on in Passing a regex from a CGI HTML form security is an issue. Here you replied to someone who is obviously struggling with the basics and provided them a foot gun... 'I use this on a couple of my CGI scripts', mentioning nothing about sanitizing the data. Since you're already using perl I see no reason why you don't just write to a file from your script rather than shelling out, running sed with no error checking. Rather than reinvent the wheel this is like taking a unicycle along with you when riding your bike. Sure you could do it, but what's the point? Seems unnecessarily messy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to get post parameters and print/log them in Perl
by Linicks (Scribe) on Nov 11, 2016 at 16:09 UTC | |
by marto (Cardinal) on Nov 11, 2016 at 16:15 UTC | |
by Linicks (Scribe) on Nov 11, 2016 at 16:20 UTC |