Bugzilla – Attachment 162868 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: Prevent TT to evaluate data from DB
Bug-36244-Prevent-TT-to-evaluate-data-from-DB.patch (text/plain), 1.49 KB, created by
Jonathan Druart
on 2024-03-07 09:36:39 UTC
(
hide
)
Description:
Bug 36244: Prevent TT to evaluate data from DB
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-03-07 09:36:39 UTC
Size:
1.49 KB
patch
obsolete
>From 238dc709b961a42c475708afe9786bad3303dbb2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 7 Mar 2024 10:35:38 +0100 >Subject: [PATCH] Bug 36244: Prevent TT to evaluate data from DB > >Reversing the order could be a nice fix here (Thanks Martin for the >idea). >--- > C4/Letters.pm | 23 ++++++++++++----------- > 1 file changed, 12 insertions(+), 11 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index a0404ac7075..b0789b8b0b7 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -618,6 +618,18 @@ sub GetPreparedLetter { > return; > my $want_librarian = $params{want_librarian}; > >+ >+ $letter->{content} = _process_tt( >+ { >+ content => $letter->{content}, >+ lang => $lang, >+ loops => $loops, >+ objects => $objects, >+ substitute => $substitute, >+ tables => $tables, >+ } >+ ); >+ > if (%$substitute) { > while ( my ($token, $val) = each %$substitute ) { > $val //= q{}; >@@ -688,17 +700,6 @@ sub GetPreparedLetter { > } > } > >- $letter->{content} = _process_tt( >- { >- content => $letter->{content}, >- lang => $lang, >- loops => $loops, >- objects => $objects, >- substitute => $substitute, >- tables => $tables, >- } >- ); >- > $letter->{title} = _process_tt( > { > content => $letter->{title}, >-- >2.34.1
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