[Moscow.pm] Использование Text::Xslate в taint mode
TheAthlete
theathlet на yandex.ru
Ср Янв 9 04:40:04 PST 2013
Здравствуйте!
Подскажите пожайлуста, как можно работать с Text::Xslate в taint mode
(ключ -T). Ругается на на открытие файла
test.pl
#!/usr/bin/perl -w -T
use strict;
use Text::Xslate;
use CGI::Carp qw/fatalsToBrowser/;
use open qw/:std :utf8/;
use utf8;
use CGI qw/:standard -utf8/;
use File::Slurp;
print "Content-type: text/html\n\n";
my $tx = Text::Xslate->new(
syntax => "Kolon",
path => ['.','templates'],
cache => 1,
cache_dir => './.xslate_cache',
);
print $tx->render('test.tx');
test.tx
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<meta charset="utf8">
</head>
<body>
<h3>test</h3>
</body>
</html>
Апач выводит ошибку
Insecure dependency in open while running with -T switch at
/usr/local/lib/perl5/Text/Xslate.pm line 416.
Подробная информация о списке рассылки Moscow-pm