summaryrefslogtreecommitdiff
path: root/lib/JWebmail.pm
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2022-05-06 02:24:42 +0200
committerJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2022-05-06 02:24:42 +0200
commite629a35ea29dd9da9f61511130cbbee6d910e4cf (patch)
tree97c25c1da8f29967e8205902142a9b038b1684e3 /lib/JWebmail.pm
parent3fbc68b0892b2914471eeab7885bd4f9e7f9175f (diff)
switched to toml config format
improved security with load over require
Diffstat (limited to 'lib/JWebmail.pm')
-rw-r--r--lib/JWebmail.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/JWebmail.pm b/lib/JWebmail.pm
index 98001a1..8c01596 100644
--- a/lib/JWebmail.pm
+++ b/lib/JWebmail.pm
@@ -2,6 +2,8 @@ package JWebmail v1.2.0;
use Mojo::Base Mojolicious;
+use Module::Load 'load';
+
use JWebmail::Controller::Webmail;
use JWebmail::Model::ReadMails::Role;
use JWebmail::Model::ReadMails::QMailAuthuser;
@@ -43,7 +45,7 @@ sub startup {
# load plugins
push @{$self->plugins->namespaces}, 'JWebmail::Plugin';
- $self->plugin('INIConfig');
+ $self->plugin('TOMLConfig');
#die unless $self->validateConf;
$self->plugin('ServerSideSessionData');
@@ -57,7 +59,7 @@ sub startup {
my $read_mails = do {
if ($mode eq 'development') {
my $cls = $self->config->{development}{read_mock};
- eval "require $cls" || die "Issue for module $cls with: $@";
+ eval { load $cls; 1 } || die "Issue for module $cls with: $@";
$cls->new;
}
else {