Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
1e03bf82
Unverified
Commit
1e03bf82
authored
Nov 21, 2019
by
Stefan Hornburg (Racke)
Browse files
Prevent Sympa daemon crash due to a broken plugin module.
parent
fe59ff55
Changes
2
Hide whitespace changes
Inline
Side-by-side
cpanfile
View file @
1e03bf82
...
...
@@ -95,6 +95,9 @@ requires 'List::Util::XS', '>= 1.20';
# Note: 1.22 or later is recommended.
requires 'Locale::Messages', '>= 1.20';
# Used to load plugins
requires 'Module::Runtime';
# MHonArc is used to build Sympa web archives
requires 'MHonArc::UTF8';
...
...
src/lib/Sympa/Message/Plugin.pm
View file @
1e03bf82
...
...
@@ -30,6 +30,7 @@ package Sympa::Message::Plugin;
use
strict
;
use
warnings
;
use
English
qw(-no_match_vars)
;
use
Module::
Runtime
qw(use_module)
;
use
Sympa::
Log
;
...
...
@@ -58,8 +59,7 @@ sub execute {
unless
$hook_module
=~
/::/
;
unless
(
exists
$handlers
{
$hook_module
.
'
->
'
.
$hook_name
})
{
eval
"
use
$hook_module
;
";
if
(
$EVAL_ERROR
)
{
unless
(
eval
{
use_module
(
$hook_module
);
1
;
})
{
$log
->
syslog
('
err
',
'
Cannot load hook module %s: %s
',
$hook_module
,
$EVAL_ERROR
);
return
undef
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment