Fellow Monasterians,
I have -T in my shebang and it's complaining about a write function in Imager, but IMHO, I don't think the error has anything to do with Imager itself. This node was helpful, but not definitive. The thing that I'm confused about is that the values are hard coded or have been untainted elsewhere (and not returning any error). Here's the error:
Error executing run mode 's': Insecure dependency in open while running with -T switch at /usr/lib/perl/5.8/IO/File.pm line 70, <fh00001chicago_test.jpg> line 197.my $image_name = 'foobar.jpg'; #from user my $upload_dir = '../clients/images'; #hard coded $self->make_thumb($image_name, $upload_dir, 'jpeg'); sub make_thumb { my $self = shift; use Imager; my ($image_name, $upload_dir, $file_exten) = @_; ........ imager stuff here .......... $image_name =~ /^(\w+)\.(\w+)$/; $image_name = $1; my $to_write = $upload_dir.'/'.$image_name.'_thumb.jpg'; #$to_write =~ /(.*)/; $to_write = $1; #this didn't help $img->write(file=>$to_write, type=>$file_exten) or $self->push_error("Cannot write thumbname because: $!"); }
What am I missing? TIA
Update: Fixed shift and added error message
In reply to Insecure dependency ... with -T switch by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |