Thread Fragen zum Taintmodus (13 answers)
Opened by rosti at 2020-01-21 10:20

rosti
 2020-01-21 10:20
#191168 #191168
User since
2011-03-19
3194 Artikel
BenutzerIn
[Homepage]
user image
Hier mein Script

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl -t

use strict;
use warnings;
use Data::Dumper;
require parse_eav_file;

$SIG{__WARN__} = sub { die @_ };
print eval{
    my $m = bless{ CONTENT => 'Hallo!' };

    my $eav = $m->parse_eav_file("...");
    my $class = $eav->{'/'}{class};

    my $classfile = $class;
    $classfile =~ s|::|/|g;
    $classfile =~ s|\w||g;   # Leerstring!
    require "$classfile.pm"; # Insecure dependency in require while running with -t switch at ..

    
    "Content-Type: text/plain; Charset=utf-8\n\n".$m->{CONTENT};

} || "Content-Type: text/plain; Charset=utf-8\n\n$@";


-t ist eingeschaltet. $classfile ist leer und trotzdem die Warnung. Sicherer als leer geht nicht! Aber auch wenn der Modulname nur ASCI Buchstaben enthält erscheint die Warnung die in meinem Fall zum die wird.

Wie kriege ich die Warnung weg?

MFG
Last edited: 2020-01-21 10:21:56 +0100 (CET)

View full thread Fragen zum Taintmodus