Line 0
Link Here
|
0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
|
3 |
return { |
4 |
bug_number => "36244", |
5 |
description => "Template Toolkit syntax not escaped in letter templates", |
6 |
up => sub { |
7 |
my ($args) = @_; |
8 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
9 |
|
10 |
my $query = q{SELECT * FROM letter WHERE content LIKE "[|%%SET%<<%|%]" ESCAPE '|'}; |
11 |
my $sth = $dbh->prepare($query); |
12 |
$sth->execute(); |
13 |
if ( $sth->rows ) { |
14 |
say $out "You have one or more templates that have been affected by bug 36244."; |
15 |
say $out "These templates assign template toolkit variables values"; |
16 |
say $out "using the double arrows syntax. E.g. [% SET name = '<<branches.branchname>>' %]"; |
17 |
say $out |
18 |
"This will no longer function correctly as Template Toolkit is now rendered before the double arrow syntax."; |
19 |
say $out "The following notices will need to be updated:"; |
20 |
|
21 |
while ( my $row = $sth->fetchrow_hashref() ) { |
22 |
say $out |
23 |
"ID: $row->{id} / MODULE: $row->{module} / CODE: $row->{code} / BRANCHCODE: $row->{branchcode} / NAME: $row->{name}"; |
24 |
} |
25 |
} |
26 |
}, |
27 |
}; |