Hi,
You can replace the code with :
.....
unless ($file =~ m,^([-\w. ]+)$, and $file !~ m,\.\., and -e "$args->{root}/templates/$args->{cfg}->{template}/$file") {
return $args->error("Invalid page $file");
}
....
That's it.
Cheers,
jean
You can replace the code with :
.....
unless ($file =~ m,^([-\w. ]+)$, and $file !~ m,\.\., and -e "$args->{root}/templates/$args->{cfg}->{template}/$file") {
return $args->error("Invalid page $file");
}
....
That's it.
Cheers,
jean