Bug 14439: Typo in Bug 14408 regexp
authorFridolin Somers <fridolin.somers@biblibre.com>
Tue, 23 Jun 2015 13:50:39 +0000 (15:50 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 24 Jun 2015 13:53:25 +0000 (10:53 -0300)
In Bug 14408 first patch, the regexp used needs an escape on dot and does not need an ending "?"

Test plan :
  - prove t/db_dependent/Auth.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Auth.pm

index 34c3f91..268ef35 100644 (file)
@@ -159,7 +159,7 @@ sub get_template_and_user {
     C4::Context->interface( $in->{type} );
 
     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" unless $in->{'template_name'} =~ m/^[$safe_chars]+\.tt$/ig; #sanitize input
 
     $in->{'authnotrequired'} ||= 0;
     my $template = C4::Templates::gettemplate(