Make sure managesieve_default is not a dir (#6773)

pull/6781/head
Aleksander Machniak 6 years ago
parent 4ef87fe856
commit 2a25f1778b

@ -41,7 +41,7 @@ $config['managesieve_usetls'] = false;
// Note: These can be also specified as an array of options indexed by hostname // Note: These can be also specified as an array of options indexed by hostname
$config['managesieve_conn_options'] = null; $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'; $config['managesieve_default'] = '/etc/dovecot/sieve/global';
// The name of the script which will be used when there's no user script // The name of the script which will be used when there's no user script

@ -258,7 +258,7 @@ class rcube_sieve_engine
$script_name = 'roundcube'; $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); $content = file_get_contents($script_file);
} }

Loading…
Cancel
Save