Bug 14408: Allow tmpl and empty in template paths

This commit is contained in:
Fridolin Somers 2015-06-23 14:09:06 +02:00
parent 253b6f1f51
commit 4e1b447b4c
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ sub get_template_and_user {
my ( $user, $cookie, $sessionID, $flags );
my $safe_chars = 'a-zA-Z0-9_\-\/';
die "bad template path" unless $in->{'template_name'} =~ m/^[$safe_chars]+.tt?$/ig; #sanitize input
die "bad template path" if $in->{'template_name'} && $in->{'template_name'} !~ m/^[$safe_chars]+\.(tt|tmpl)$/ig; #sanitize input
$in->{'authnotrequired'} ||= 0;
my $template = C4::Templates::gettemplate(