eXile has asked for the wisdom of the Perl Monks concerning the following question:
I'm wondering if it is secure to pass $regex into YAPE::Regex::Explain this way, and if not please provide me with a way this could be exploited security-wise.#!/usr/bin/perl use strict; use CGI; use YAPE::Regex::Explain; my $cgi = CGI->new(); die unless $cgi->param('regex'); my $regex = $cgi->param('regex'); print $cgi->header('text/plain'); print YAPE::Regex::Explain->new(qr/$regex/)->explain;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI script security: putting untainted input into a qr//
by merlyn (Sage) on Apr 14, 2005 at 02:21 UTC | |
by eXile (Priest) on Apr 14, 2005 at 02:38 UTC | |
by merlyn (Sage) on Apr 14, 2005 at 02:39 UTC | |
by MidLifeXis (Monsignor) on Apr 14, 2005 at 17:36 UTC |