Bug 14467 - Security updates break some Koha plugins
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 25 Jun 2015 20:41:23 +0000 (16:41 -0400)
committerMason James <mtj@kohaaloha.com>
Sat, 25 Jul 2015 13:20:15 +0000 (01:20 +1200)
The new security updates break previously functioning plugins, most
notably the cover flow plugin and the Ebsco EDS plugin.

Test Plan:
1) Install and configure the cover flow plugin ( http://bywatersolutions.com/koha-plugins/ )
2) Note that attempting to access coverflow.pl from the OPAC results in an error
3) Apply this patch
4) Note that coverflow.pl now output html again

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>

Koha/Plugins/Base.pm

index 4e02ae6..998e71a 100644 (file)
@@ -20,6 +20,7 @@ package Koha::Plugins::Base;
 use Modern::Perl;
 
 use Module::Pluggable require => 1;
+use Cwd qw(abs_path);
 
 use base qw{Module::Bundled::Files};
 
@@ -106,7 +107,7 @@ sub get_template {
     require C4::Auth;
 
     my ( $template, $loggedinuser, $cookie ) = C4::Auth::get_template_and_user(
-        {   template_name   => $self->mbf_path( $args->{'file'} ),
+        {   template_name   => abs_path( $self->mbf_path( $args->{'file'} ) ),
             query           => $self->{'cgi'},
             type            => "intranet",
             authnotrequired => 1,