Bugzilla – Attachment 191539 Details for
Bug 40719
Explicit turn off RELATIVE file paths for plugins for user-entered templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40719: Explicitly turn off RELATIVE for TemplateUtils
Bug-40719-Explicitly-turn-off-RELATIVE-for-Templat.patch (text/plain), 1.72 KB, created by
David Cook
on 2026-01-16 00:52:33 UTC
(
hide
)
Description:
Bug 40719: Explicitly turn off RELATIVE for TemplateUtils
Filename:
MIME Type:
Creator:
David Cook
Created:
2026-01-16 00:52:33 UTC
Size:
1.72 KB
patch
obsolete
>From 44c0fb6a4cb2e09ef1137fb33e61ecd3ac341aed Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 16 Jan 2026 00:49:37 +0000 >Subject: [PATCH] Bug 40719: Explicitly turn off RELATIVE for TemplateUtils > >This change explicitly turns off RELATIVE in Koha/TemplateUtils.pm > >Test plan (Koha/TemplateUtils.pm): >0. Apply the patch and koha-plack --restart kohadev >1. Go to http://localhost:8081/cgi-bin/koha/tools/letter.pl >2. Click "New notice" and choose "reports" >3. Add the following to the report: >[% IF ( x == 1 ) %] >One >[% ELSE %] >Two >[% END %] >4. Go to http://localhost:8081/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved >5. Create a report like the following: >SELECT biblionumber FROM biblio; >6. Click "Run with template" and choose the Reports template you made >7. Note that the output shows "Two" >8. Edit your Reports notice and include the following: >[% INSERT ../etc/passwd %] >9. Re-run the report using "Run with template" >10. Note that the output shows the regular SQL results (ie template transform not successful) > >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > Koha/TemplateUtils.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/TemplateUtils.pm b/Koha/TemplateUtils.pm >index 5e6b9cb8847..84b693fe824 100644 >--- a/Koha/TemplateUtils.pm >+++ b/Koha/TemplateUtils.pm >@@ -60,6 +60,7 @@ sub process_tt { > { > EVAL_PERL => 0, > ABSOLUTE => 0, >+ RELATIVE => 0, > PLUGIN_BASE => 'Koha::Template::Plugin', > COMPILE_EXT => $use_template_cache ? '.ttc' : '', > COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', >-- >2.39.5
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 40719
:
185848
|
186179
|
186180
|
191538
| 191539