Lines 8-14
use Modern::Perl;
Link Here
|
8 |
use CGI qw ( -utf8 ); |
8 |
use CGI qw ( -utf8 ); |
9 |
use Test::MockModule; |
9 |
use Test::MockModule; |
10 |
use List::MoreUtils qw/all any none/; |
10 |
use List::MoreUtils qw/all any none/; |
11 |
use Test::More tests => 8; |
11 |
use Test::More tests => 11; |
12 |
use C4::Members; |
12 |
use C4::Members; |
13 |
use Koha::AuthUtils qw/hash_password/; |
13 |
use Koha::AuthUtils qw/hash_password/; |
14 |
|
14 |
|
Lines 105-110
$dbh->{RaiseError} = 1;
Link Here
|
105 |
|
105 |
|
106 |
ok( ( any { $_->name eq 'KohaOpacLanguage' and $_->value eq 'en' } @$cookies ), |
106 |
ok( ( any { $_->name eq 'KohaOpacLanguage' and $_->value eq 'en' } @$cookies ), |
107 |
'BZ9735: invalid language, then default to en'); |
107 |
'BZ9735: invalid language, then default to en'); |
|
|
108 |
|
109 |
for my $template_name ( |
110 |
qw( |
111 |
../../../../../../../../../../../../../../../etc/passwd |
112 |
test/../../../../../../../../../../../../../../etc/passwd |
113 |
/etc/passwd |
114 |
) |
115 |
) { |
116 |
my ( $template, $loggedinuser, $cookies ) = get_template_and_user( |
117 |
{ |
118 |
template_name => $template_name, |
119 |
query => $query, |
120 |
type => "intranet", |
121 |
authnotrequired => 1, |
122 |
flagsrequired => { catalogue => 1 }, |
123 |
} |
124 |
); |
125 |
my $file_exists = ( -f $template->{filename} ) ? 1 : 0; |
126 |
is ( $file_exists, 0, 'The file template_name should have been sanitize' ); |
127 |
} |
128 |
|
108 |
} |
129 |
} |
109 |
|
130 |
|
110 |
# Check that there is always an OPACBaseURL set. |
131 |
# Check that there is always an OPACBaseURL set. |
111 |
- |
|
|