[Bioperl-l] Bio::Factory::EMBOSS, CGI and taint
Lincoln Stein
lstein at cshl.edu
Thu Mar 1 23:12:29 UTC 2007
You'll need to set the %ENV hash to a known safe state. e.g.:
$ENV{PATH}="/bin:/usr/bin:/usr/local/bin";
Lincoln
On 2/28/07, Neil Saunders <n.saunders at uq.edu.au> wrote:
>
> Dear Bioperlers,
>
> I'm trying to understand an error that occurs when Bio::Factory::EMBOSS is
> used
> in a CGI script. Using BioPerl 1.5.2 on Ubuntu Dapper, Apache 2.0.55,
> Perl 5.8.7.
>
> If I load this test CGI script (cgi.pl) in a browser:
>
> BEGIN CODE
> ----------
> #!/usr/bin/perl -Tw
> use strict;
> use CGI;
> use Bio::Factory::EMBOSS;
>
> my $cgi = new CGI;
> my $f = new Bio::Factory::EMBOSS;
>
> print $cgi->header,
> $cgi->start_html,
> $cgi->end_html;
> --------
> END CODE
>
> I get a 500 server error and the Apache error log reads:
> [error] [client 192.168.0.3] Premature end of script headers: cgi.pl
>
> I can fix this in 2 ways:
>
> (1) Move the "my $f = new Bio::Factory::EMBOSS" line to the end of the
> script,
> which isn't a very useful fix.
> (2) Remove the -T switch from the shebang line
>
> There seem to be a few old posts on the list regarding "taint-safe"
> modules. It
> seems that the new Bio::Factory::EMBOSS object is interfering with the
> headers
> in some way, but I'm no CGI.pm guru and wondered if anyone could shed
> light on this.
>
> thanks,
> Neil
> --
> School of Molecular and Microbial Sciences
> University of Queensland
> Brisbane 4072 Australia
>
> http://nsaunders.wordpress.com
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
--
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu
More information about the Bioperl-l
mailing list