From 2a25f1778bd0cf96a08cb655fe5af335ca55767b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 26 May 2019 09:29:02 +0200 Subject: [PATCH] Make sure managesieve_default is not a dir (#6773) --- plugins/managesieve/config.inc.php.dist | 2 +- plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/managesieve/config.inc.php.dist b/plugins/managesieve/config.inc.php.dist index 2d10ddbf2..34d8bf4eb 100644 --- a/plugins/managesieve/config.inc.php.dist +++ b/plugins/managesieve/config.inc.php.dist @@ -41,7 +41,7 @@ $config['managesieve_usetls'] = false; // Note: These can be also specified as an array of options indexed by hostname $config['managesieve_conn_options'] = null; -// default contents of filters script (eg. default spam filter) +// A file with default script content (eg. spam filter) $config['managesieve_default'] = '/etc/dovecot/sieve/global'; // The name of the script which will be used when there's no user script diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index 1dcec48ba..8d74b17db 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -258,7 +258,7 @@ class rcube_sieve_engine $script_name = 'roundcube'; } - if ($script_file && is_readable($script_file)) { + if ($script_file && is_readable($script_file) && !is_dir($script_file)) { $content = file_get_contents($script_file); }