my ( $user, $cookie, $sessionID, $flags );
C4::Context->interface( $in->{type} );
my $safe_chars = 'a-zA-Z_\-\/';
die "bad template path" unless $in->{'template_name'} =~ m/^[$safe_chars]+.tt?$/ig; #sanitize input
$in->{'authnotrequired'} ||= 0;
my $template = C4::Templates::gettemplate(
-