Bugzilla – Attachment 136713 Details for
Bug 12758
Failure when loading or parsing XSLT stylesheets over HTTPS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12758: Add Loader call in Koha::XSLT::Base
Bug-12758-Add-Loader-call-in-KohaXSLTBase.patch (text/plain), 1.98 KB, created by
Marcel de Rooy
on 2022-06-29 12:18:42 UTC
(
hide
)
Description:
Bug 12758: Add Loader call in Koha::XSLT::Base
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-06-29 12:18:42 UTC
Size:
1.98 KB
patch
obsolete
>From f87a2764d8d0cd075ddf48915accee8f0806d337 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 24 Sep 2014 17:01:00 +0200 >Subject: [PATCH] Bug 12758: Add Loader call in Koha::XSLT::Base >Content-Type: text/plain; charset=utf-8 > >Reviving a report back from 2014. The workaround is now moved to a >separate helper module from another patch. > >Test plan: >Test OPACXSLTDetailsDisplay with an https reference. >Test it again with a stylesheet referring to a https include. >--- > Koha/XSLT/Base.pm | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > >diff --git a/Koha/XSLT/Base.pm b/Koha/XSLT/Base.pm >index 7b6134994f..38781ea233 100644 >--- a/Koha/XSLT/Base.pm >+++ b/Koha/XSLT/Base.pm >@@ -39,6 +39,9 @@ Koha::XSLT::Base - Facilitate use of XSLT transformations > via the err attribute. > Reloading XSLT files can be done with the refresh method. > >+ The module refers to a (temporary) helper module Koha::XSLT::Loader that >+ resolves issues in libxml2/libxslt for https references. >+ > =head1 METHODS > > =head2 new >@@ -117,6 +120,7 @@ Koha::XSLT::Base - Facilitate use of XSLT transformations > use Modern::Perl; > use XML::LibXML; > use XML::LibXSLT; >+use Koha::XSLT::Loader; > use Koha::XSLT::Security; > > use base qw(Class::Accessor); >@@ -327,7 +331,9 @@ sub _load { > my $parser = XML::LibXML->new; > $self->{_security}->set_parser_options($parser); > my $style_doc = eval { >- $parser->load_xml( $self->_load_xml_args($filename, $code) ) >+ # Next call is a workaround as long as libxml2/libxslt have problems with https refs >+ my $args = Koha::XSLT::Loader->load( $filename, $code ); >+ $parser->load_xml($args); > }; > if ($@) { > $self->_set_error( XSLTH_ERR_3, $@ ); >@@ -348,11 +354,6 @@ sub _load { > return $rv; > } > >-sub _load_xml_args { >- my $self = shift; >- return $_[1]? { 'string' => $_[1]//'' }: { 'location' => $_[0]//'' }; >-} >- > # _set_error > # Internal routine for handling error information. > >-- >2.20.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 12758
:
31974
|
31975
|
136711
|
136712
|
136713
|
138199
|
138200
|
138201
|
140790
|
140791
|
140792
|
142768
|
142770
|
142771
|
142772
|
143504