don't crash validating the template name
authorTony Cook <tony@develop-help.com>
Mon, 3 Mar 2014 08:09:34 +0000 (19:09 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 3 Mar 2014 08:09:34 +0000 (19:09 +1100)
site/cgi-bin/modules/BSE/UI/AdminNewsletter.pm

index 26bbe960d08d0dfd98ff0b103592149df02f2498..311ade90a33ce5b4a7fc775bf1a81b21e79eda61 100644 (file)
@@ -8,7 +8,7 @@ use BSE::Util::HTML qw(:default popup_menu);
 use BSE::Util::Iterate;
 use base 'BSE::UI::AdminDispatch';
 
-our $VERSION = "1.003";
+our $VERSION = "1.004";
 
 =head1 NAME
 
@@ -295,6 +295,7 @@ sub validate {
   for my $field (qw(html_template text_template article_template)) {
     my $value = $q->param($field);
     if ($value) {
+      require BSE::Template;
       if ($value =~ /\.\./) {
        push(@$errors, [ $field, "Template $value is invalid, contains .." ]);
       }