From e52c242486f9e25b0b40e7f96198ca1c9fdb0c3b Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 25 Jun 2015 09:35:37 +0200 Subject: [PATCH] Revert "Bug 14408: Add tests to get_template_and_user" This reverts commit 6977b5b27fc2cc6d04fbbc71ec171a23f5e71f94. --- t/db_dependent/Auth.t | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t index 842db9acb2..6a100bc5dc 100644 --- a/t/db_dependent/Auth.t +++ b/t/db_dependent/Auth.t @@ -8,7 +8,7 @@ use Modern::Perl; use CGI; use Test::MockModule; use List::MoreUtils qw/all any none/; -use Test::More tests => 9; +use Test::More tests => 6; use C4::Members; use Koha::AuthUtils qw/hash_password/; @@ -105,27 +105,6 @@ $dbh->{RaiseError} = 1; ok( ( any { $_->name eq 'KohaOpacLanguage' and $_->value eq 'en' } @$cookies ), 'BZ9735: invalid language, then default to en'); - - for my $template_name ( - qw( - ../../../../../../../../../../../../../../../etc/passwd - test/../../../../../../../../../../../../../../etc/passwd - /etc/passwd - ) - ) { - my ( $template, $loggedinuser, $cookies ) = get_template_and_user( - { - template_name => $template_name, - query => $query, - type => "intranet", - authnotrequired => 1, - flagsrequired => { catalogue => 1 }, - } - ); - my $file_exists = ( -f $template->{filename} ) ? 1 : 0; - is ( $file_exists, 0, 'The file template_name should have been sanitize' ); - } - } my $hash1 = hash_password('password'); -- 2.39.5