[Bioperl-l] Bio::Factory::EMBOSS, CGI and taint

Neil Saunders n.saunders at uq.edu.au
Wed Feb 28 05:25:08 EST 2007

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:

#!/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,

I get a 500 server error and the Apache error log reads:
[error] [client] 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.

  School of Molecular and Microbial Sciences
  University of Queensland
  Brisbane 4072 Australia


More information about the Bioperl-l mailing list