From da99caee6f1106eeea537a0552f2d2ad298500a4 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 17 Jan 2020 11:20:34 +0000 Subject: [PATCH] Add a write_file in intranetDetail too Content-Type: text/plain; charset=utf-8 If you only apply the two examples patches (this one and the former), you should not have a warning on write_file in your logs but instead the xslt should have created a file /tmp/breached.txt. If you have all patches and you removed the breached.txt file, this hack should only generate log entries like below. The breached file should not be created again. The output of the detail page should be minimal, since the stylesheet does not return its normal contents. write_file called in XML::LibXSLT at /usr/share/koha/Koha/XSLT/Security.pm line 93. XSLT::Base: runtime error: file /usr/share/koha/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl element document File write for /tmp/breached.txt refused runtime error: file /usr/share/koha/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl element document xsltDocumentElem: write rights for file:///tmp/breached.txt denied at /usr/share/koha/Koha/XSLT/Base.pm line 228. --- koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 412b7c87b6..2c6b095314 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -9,10 +9,11 @@ xmlns:items="http://www.koha-community.org/items" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" + xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl" exclude-result-prefixes="marc items str"> - &secret; + &secret;Breached! -- 2.11.0