Bug 36244: DBRev 23.05.09.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2024-03-26 15:43:35 +00:00
parent 5bbb73ed05
commit 426ca044e9
2 changed files with 1 additions and 28 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "23.05.09.000";
$VERSION = "23.05.09.001";
sub version {
return $VERSION;

View File

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