Bugzilla – Attachment 163257 Details for
Bug 36244
Template toolkit syntax not escaped in letter templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36244: Add atomic update to check for affected notices
Bug-36244-Add-atomic-update-to-check-for-affected-.patch (text/plain), 1.92 KB, created by
Katrin Fischer
on 2024-03-15 15:53:57 UTC
(
hide
)
Description:
Bug 36244: Add atomic update to check for affected notices
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2024-03-15 15:53:57 UTC
Size:
1.92 KB
patch
obsolete
>From 3cfefb58c3dfcbeb94979a91e38a1ab3fe43899b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 7 Mar 2024 11:10:35 -0500 >Subject: [PATCH] Bug 36244: Add atomic update to check for affected notices > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Fixed some typos in bug numbers and text. >--- > .../data/mysql/atomicupdate/bug_36244.pl | 27 +++++++++++++++++++ > 1 file changed, 27 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_36244.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_36244.pl b/installer/data/mysql/atomicupdate/bug_36244.pl >new file mode 100755 >index 00000000000..5fd40ecb2d5 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_36244.pl >@@ -0,0 +1,27 @@ >+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}"; >+ } >+ } >+ }, >+}; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36244
:
162866
|
162867
|
162868
|
162871
|
162872
|
162876
|
162877
|
162908
|
162909
|
162910
|
163255
|
163256
| 163257 |
163383
|
163384
|
163385